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; }
Comments
Leave a comment