60 469
Assignments Done
98,1%
Successfully Done
In April 2018

Answer to Question #19601 in C++ for Akshara Sharma

Question #19601
write a c++ program that accepts marks in 5 subjects and outputs average marks.
Expert's answer
#include <iostream>
#include <stdlib.h>

using namespace std;

int main()
{
int n;
int m,a=0;
cout<<"please enter marks"<<endl;
for (int i=1;i<=5;i++)
{ cin>>n;
a=a+n;}
m=a/5;
cout<<endl<<"average="<<m<<endl;
&
& system("PAUSE");
& 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 first!

Leave a comment

Ask Your question

Submit
Privacy policy Terms and Conditions