Starting to do arrays and my first question is...
Wrtie a loop to print the elements of an array of int called numbers.
You only know that the array has 5 elements.
i
My 1st attempt is going like this....
#include <iostream>
using namespace std;
int main()
{
int number[5];
int i = 0;
while ( i < 5)
{
number [i] = i + 1;
i++;
cout << number;
}
return 0;
}
Am I even going in the right direction? I'm just following my text text book.