2d Array Simulating Output(adding features)

#include<iostream>
#include<iomanip>
using namespace std;
int main()
{
int,y;
double,stdquiz[4][3],sum(0);
cout<<.setf(ios::fixed);
cout<<.setf(ios::showpoint);
cout<<.precision(2);
cout<<"Enter 3 Quizzes Score for Students";
for(x=0;x<4;x++)
cout<<"Student #"<<x+1<<endl;
for(y=0;y<3;y++)
{
cout<<"Quiz #"<<y+1<<":";
cin>>stdquiz[x][y];
}
}
cout<<setw(10)<<"Student"
<<setw(20)<<"Quizzes"
<<setw(20)<<"Average"
<<endl;
for(x=0;x<4;x++)
cout<<setw(10)<<x+1;
for(y=0;y<3;y++)
{
cout<<setw(10)<<stdquiz[x][y];
sum+=stdquiz[x][y];
}
cout<<setw(10)<<sum/3<<endl;
sum=0;
system("PAUSE");
}

Also adding the feature of Remarks. Something like this

Remarks:
Passed
Failed
Failed
Passed

The condition is if average is <=75 then display Passed else Failed.

Where will i insert the if conditions?
Put your code in between code tags
Since you are building a table you would presumable need a column in which to print pass or fail
Run the program and after it prints out the student ID and average add a line with the if statement. Now rerun the program and test if you get the desired effect. Continue to run and make code mods until the program performs as desired.
Topic archived. No new replies allowed.