0

Write a program that promods the user to enter 5 test score and then print the average test score.

Could you please help me do this question

29th Oct 2020, 8:57 AM
Seraphina
Seraphina - avatar
9 Antworten
+ 5
nora_d Yeah .float is the datatype used to indicate decimal numbers. For big decimal nos u can use double as well. But in this case float is sufficient and ur program is correct i think so.
29th Oct 2020, 9:29 AM
Alphin K Sajan
Alphin K Sajan - avatar
+ 7
We are happy to help u with ur codes(which u was supposed to write in the description). But there's noone here to write the entire code for u.. Hope u understand.. Also pls tag the language in which u wanna code..
29th Oct 2020, 9:04 AM
Alphin K Sajan
Alphin K Sajan - avatar
+ 6
I think stmt of average calculation must end with a semicolon. ie, double average=...blabla; Then it'll work fine.
29th Oct 2020, 9:22 AM
Alphin K Sajan
Alphin K Sajan - avatar
+ 2
Sure I'll write it down
29th Oct 2020, 9:02 AM
Seraphina
Seraphina - avatar
+ 2
Ohh I seeeee Thank u so much ✨ 😄
29th Oct 2020, 9:31 AM
Seraphina
Seraphina - avatar
+ 1
I'm sorry I didn't know 🙏
29th Oct 2020, 9:17 AM
Seraphina
Seraphina - avatar
+ 1
C++
29th Oct 2020, 9:18 AM
Seraphina
Seraphina - avatar
+ 1
Ohhhh okay thank uu It also said in the question ( Assume that the test scores are decimal numbers ) Will it be the same as long as I did put the float
29th Oct 2020, 9:25 AM
Seraphina
Seraphina - avatar
0
#include <iostream> using namespace std; int main() { float a , b, c,d,e; cout<< "Enter first test score :"; cin >> a; cout<< "Enter second test score :"; cin >> b; cout<< "Enter third test score :"; cin >> c; cout<< "Enter the fourth test score :"; cin >> d; cout<< "Enter the fifth test score :"; cin >> e; double average =( a+b+c+d+e )/5 cout << " your average score is :" << average<< endl; return 0; }
29th Oct 2020, 9:14 AM
Seraphina
Seraphina - avatar