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.
1
Expert's answer
2013-06-24T11:52:57-0400
#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; }
Numbers and figures are an essential part of our world, necessary for almost everything we do every day. As important…
APPROVED BY CLIENTS
"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