I hope this is not homework! That would be cheating!
This will do something like that, learn from it:
[php]
#include <iostream>
#include <iomanip> // for setw()
#include <stdlib.h> // 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]
Reputation Points: 1333
Solved Threads: 1403
DaniWeb's Hypocrite
Offline 5,792 posts
since Oct 2004