I hope this is not homework! That would be cheating!
This will do something like that, learn from it:
[php]
#include
#include // for setw()
#include // for system()
using namespace std;
int main()
{
int k;
int scores[50]; // array to hold 50 integers
// initialize the array
for(k = 0; k < 50; k++)
scores[k] = 75;
// test it
for(k = 0; k < 50; k++)
cout << scores[k] << setw(8);
cout << endl;
system("PAUSE"); // wait
return 0;
}
[/php]
vegaseat
DaniWeb's Hypocrite
5,989 posts since Oct 2004
Reputation Points: 1,345
Solved Threads: 1,417
of course it's homework.
If it were not it wouldn't be worded as "do this, do that" which is most likely an exact replication of the text of his assignment...
jwenting
duckman
8,392 posts since Nov 2004
Reputation Points: 1,662
Solved Threads: 337