Hi all, so i'm trying to use a function to print 2 matrices, i expect it to print in the 2x2 form but it keeps appearing on a straight line.
The function:
int print(int p, int q){
int first[2][2], second[2][2];
for (p=0;p<2;p++){
for (q=0;q<2;q++){
cout<<first[p][q]<<endl;
}
}
for(p=0;p<2;++p){
for(q=0;q<2;++q)
cout<<second[p][q]<<endl;
}
}
any and all help is appreciated, thank you.