76 412
Assignments Done
Successfully Done
In May 2019

Answer to Question #42235 in C++ for Yazid abubakar

Question #42235
write a c program that accept 10 student grade a calculate their average using microsoft visual c++
Expert's answer
#include <stdio.h>
#include <stdlib.h>
//main function
int main(int argc, char *argv[])
//variable for average
double average;
//variable for sum
double sum=0;
//variable for grade
double grade;
int i;
//promt user to enter grade
for( i=0;i<10;i++){
printf("Enter grade fro student %d: ",(i+1));
scanf("%lf",&grade);//read grade from keyboard
sum+=grade;//calculate sum
//calculate average
//show average
printf("Average = %.2lf\n\n",average);
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!


No comments. Be first!

Leave a comment

Ask Your question

Privacy policy Terms and Conditions