68 217
Assignments Done
98,9%
Successfully Done
In November 2018

Answer to Question #32260 in C++ for ghelo

Question #32260
hi i need a help, how to create a program that will compute the average grade of the student with 3 inputted quizes. they didn't teach us the input/utput.
Expert's answer
#include <iostream>
#include <conio.h>

using namespace std;
//mina function
int main()
{
int arrayofgrade[3];
//input number
for(int i=0;i<3;i++){
cout<<"Enter quiz "<<(i+1)<<": ";
cin>>arrayofgrade[i];
}
//declare variable
float sum=0;
float average=0;
//fin sum
for(int i=0;i<3;i++){
sum+=arrayofgrade[i];
}
//calculate average
average=sum/3;
//show Average
cout<<"
Average is: "<<average;
getch();//delay
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