60 594
Assignments Done
97,9%
Successfully Done
In April 2018

Answer to Question #43764 in C++ for abhishek

Question #43764
w a p in c++that accept marks in 5 subject and output its average marks
Expert's answer
#include <stdio.h>
#include <tchar.h>
#include <iostream>
using namespace std;
int main() {
const int n = 5;
int arr[n];
int sum = 0;
for (int i = 0; i < n; i++) {
cout<<"Input mark in  "<<i+1<<" subject - ";
cin>>arr[i];
sum+=arr[i];
cout<<endl;
}
cout<<"Average - "<<(double)sum/n<<endl;
system("pause");
}

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