Home -> Menu ->Test Average

Test Score Average
#include <iostream.h>
#include <stdlib.h>
#include <iomanip>
using namespace std;
int main()
{
int i,x,a,c,l;
int add;
int avg;
cout<<"This program will average out five test scores."<<endl;
cout<<"Please enter test score one."<<endl;
cin>>i;
cout<<"Please enter test score two."<<endl;
cin>>x;
cout<<"Please enter test score three."<<endl;
cin>>a;
cout<<"Please enter test score four."<<endl;
cin>>c;
cout<<"Please enter test score five."<<endl;
cin>>l;
cout<<"Thank you. :) The average test score is:";
add = i+x+a+c+l;
avg = add/5;
cout<<avg;
cout<<endl;
system("PAUSE");
return 0;
} |