write a c++ program that accepts marks in 5 subjects and outputs average marks.
1
Expert's answer
2012-11-27T09:54:13-0500
#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; }
"assignmentexpert.com" is professional group of people in Math subjects! They did assignments in very high level of mathematical modelling in the best quality. Thanks a lot
Comments
Leave a comment