array_intro - cout << "Enter next grade: "...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
Sheet1 Page 1 #include <iostream> using namespace std int main() { int scores[5] = {0} int sum = 0 double average = 0.0 cout << "Enter next grade: " cin >> scores[0] cout << "Enter next grade: " cin >> scores[1] cout << "Enter next grade: " cin >> scores[2]
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: cout << "Enter next grade: " cin >> scores[3] cout << "Enter next grade: " cin >> scores[4] sum = scores[0] + scores[1] + scores[2] + scores[3] + scores[4] average = sum / 5.0 cout << average << endl return 0 }...
View Full Document

This note was uploaded on 04/01/2008 for the course CMPSC 101 taught by Professor Drobish,renee during the Spring '07 term at Penn State.

Ask a homework question - tutors are online