#include<iostream>
#include<conio.h>
using namespace std;
struct marks{
int phy[10];
int math[10];
int chem[10];
};
int main(){
struct marks m[20];
int i,n;
cout<<"Enter the number of students : " << endl;
cin >>n;
for(i=0;i<n;i++){
cout<<"\nEnter Physics marks: " << endl;
cin >> m[i].phy; [error here]
cout<<"\nEnter Maths marks : "<< endl;
cin >> m[i].math;
cout<<"\nEnter Chemistry marks : "<< endl;
cin >> m[i].chem;
}
cout<<"\nStudents mark details : \n"<< endl;
for(i=0;i<n;i++){
cout<<"\nMarks of Student"<< i+1 <<" : "<< endl;
cout<<"\nPhysics marks: "<< m[i].phy<< endl;
cout<<"\nMaths marks: "<< m[i].math<< endl;
cout<<"\nChemistry marks: "<< m[i].chem<< endl;
cout<<"\n"<< endl;
}
return 0;
}
//There is an error in the first cin >> in the for loop. it shows no match for 'operator >>' (operand type is 'std::istream{aka std::basic_istream<char> and 'int[10]')