Answer to Question #22177 in C++ for emmanuel

Question #22177
write a program using c++ to find average score of 20 students offering 5 courses
1
Expert's answer
2013-01-21T08:35:11-0500
#include <iostream>

using namespace std;

int main()
{
int n[20];
double sum=0;

for(int i=1;i<=5;i++)
{
cout << "enter marks courses "<<i << endl;
for(int j=1;j<=20;j++)
{

cin>>n[j];

sum=sum+n[j];
}
cout<<"average="<<sum/20<<endl;
}
return 0;
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS