#include <iostream>
using namespace std;
int main() {
// int student_marks[6][5] = {
// {1,2,3,4,5},
// {6,7,8,9,10},
// {11,12,13,14,15}
// };
int student_marks[6][5];
int count=1;
for(int student=0; student<6 ;student++)
{
for(int subject=0;subject<5;subject++)
{
student_marks[student][subject] = count;
count++;
}
}
for(int student=0; student<6 ;student++)
{
for(int subject=0;subject<5;subject++)
{
cout<<student_marks[student][subject]<<" ";
}
cout<<endl;
}
cout<<endl<<endl;
for(int subject=0;subject<5;subject++)
{
for(int student=0; student<6 ;student++)
{
cout<<student_marks[student][subject]<<" ";
}
cout<<endl;
}
return 0;
}
To embed this project on your website, copy the following code and paste it into your website's HTML: