Guys, I have this question, when I run this program, the program suddenly stop and tell me it cannot be runned, could your please tell me my error thanks.
Here is the code:
#include <iostream>
using namespace std;
int main()
{
int student,subject;
int marks[student][subject];
int i,count;
student=5;
subject=3;
//Getting the marks
for(i=0;i<5;i++)
{
for(count=0;count<3;count++)
{
cout<<"Enter the marks for student: " << i+1<<endl;
cout<<", " <<"subject" << count+1<<": "<<endl;
cin>>marks[i][count];
}
}
//Displaying the marks
cout<<"n\t\tSubject 1\tSubject 2\tSubject 3"<<endl;
for(i=0;i<5;i++)
{
cout<<"Marks for student "<< i+1 <<endl;
cout<<"\t";
for(count=0;count<3;count++)
{
cout<<" " << marks[i][count]<<"\t\t"<<endl;
}
cout<<"\n";
}
return 0;
}