0
Write a C++ program that accepts marks in 5 subjects and output average marks.
2 Respuestas
+ 16
int a, b, c, d, e;
cin >> a >> b >> c >> d >> e;
cout << (a + b + c + d + e) / 5;
+ 3
The algorithm is easy enough: simply sum the marks and divide the total by five.
Good luck!