Guest User

Untitled

a guest
Oct 19th, 2017
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.32 KB | None | 0 0
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. int scores [9] = { 100, 80, 60, 75, 95, 65, 85, 40, 70 };
  6. int total = 0;
  7. for (int i = 0; sizeof(scores); i++) {
  8. total += scores[i];
  9. }
  10. double average = (double) total / sizeof(scores);
  11. cout << average << endl;
  12. cin.get();
  13. return 0;
  14. }
Add Comment
Please, Sign In to add comment