+ 16
int mark = 0; int sum = 0; for (int i = 1; i <= 5; ++i) { cout << "mark " << i << " = "; cin >> mark; sum += mark; } cout << "Avg = " << sum / 5.0 << endl;
6th Oct 2017, 9:59 AM
Babak
Babak - avatar