Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main() {
- int scores [9] = { 100, 80, 60, 75, 95, 65, 85, 40, 70 };
- int total = 0;
- for (int i = 0; sizeof(scores); i++) {
- total += scores[i];
- }
- double average = (double) total / sizeof(scores);
- cout << average << endl;
- cin.get();
- return 0;
- }
Add Comment
Please, Sign In to add comment