0

Write a C++ program that accepts marks in 5 subjects and output average marks.

6th Oct 2017, 9:26 AM
Pritam Kumar
Pritam Kumar - avatar
2 ответов
+ 16
int a, b, c, d, e; cin >> a >> b >> c >> d >> e; cout << (a + b + c + d + e) / 5;
6th Oct 2017, 9:58 AM
Krishna Teja Yeluripati
Krishna Teja Yeluripati - avatar
+ 3
The algorithm is easy enough: simply sum the marks and divide the total by five. Good luck!
6th Oct 2017, 9:35 AM
Dapper Mink
Dapper Mink - avatar