write a cpp program to inputs the marks of 7 subjects and find the sum and average amd display it in the output screen . assuming the fulls marks of each subject is 100 ,find the pc obtained and display it. need it before 8 pm today pls
Answers
Answered by
1
Answer:
#include <iostream>
using namespace std;
int main() {
int nos = 7;
double total , average , percentage;
double grades[nos];
cout << "Enter marks of all 7 subjects- \n";
for(int i = 0; i < nos; i++){
cin >> grades[i];
total = total + grades[i];
}
average = total/7;
percentage = (total/700)*100;
cout << "Your total marks " << total << endl;
cout << "Your average in 7 subjects is " << average << endl;
cout << "Your percentage is " << percentage;
return 0;
}
Explanation:
Before 8P.M
Similar questions
English,
8 days ago
English,
8 days ago
Math,
16 days ago
English,
9 months ago
Social Sciences,
9 months ago