Everything is coming out except for the average, what am I doing wrong?
#include <iostream>
#include <string>
#include <iomanip>
using namespace std;
int main()
{
string ssnumber;
int exam1 = 0, exam2 = 0, exam3 = 0, final = 0,count = 0, sum = 0;
int average1 = 0, average2 = 0, average3 = 0;
double averagegrade, classaverage;
while (count < 3)
{
cout <<"SS Number";
cin >>ssnumber;
cout <<"Exam 1";
cin >>exam1;
cout <<"Exam 2";
cin >>exam2;
cout <<"Exam 3";
cin >>exam3;
cout <<"Final";
cin >>final;
cout <<"Average";
cin >>averagegrade;
cout<<"Class average is:";
cin >>classaverage;
averagegrade = (exam1 + exam2+ exam3 + final) / 4; <--------- This part right here. It's not coming out.
classaverage = (average1 + average2 + average3) / 3;
count++;
cout<<setw(6)<<ssnumber<<setw(19)<<exam1<<setw(6)<<exam2<<setw(6)
<<exam3<<setw(6)<<final<<setw(6)<<average1<<setw(6)<<average2<<setw(12)
<<average3<<setw(6)<<averagegrade<<setw(6)<<classaverage<<endl;
}
return 0;
}