0

am trying to cout all values in an array like this

int collect[8],c;
for(c = 0; c <= 4; c++)
{
    cout << "Enter First Number : ";
    cin >> collect[c];
}
cout << collect[0, 1, 2, 3, 4] << endl;

but it displays the last value. Please leave some note to make me understand why its not working

Ghostff
  • 1,407
  • 3
  • 18
  • 30

0 Answers0