Answer to Question #22177 in C++ for emmanuel
write a program using c++ to find average score of 20 students offering 5 courses
1
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!
Learn more about our help with Assignments:
C++
Comments
Leave a comment