Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main ()
- {
- const int num_student = 20;
- int score[num_student];
- int size1, total=0;
- int count;
- cout << "Enter class size <1-20>" << endl;
- cin >> size1;
- for (count=1; count <=size1; count++)
- {
- cout << "Enter score" << endl;
- cin >> score[count];
- total = score[count] + total;
- }
- cout << "Original Scores:";
- for (count=1; count <=size1; count++)
- {
- cout << " " << score[count];
- }
- cout << endl;
- cout << "Average Score:" << endl;
- cout << total/size1 << endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement