0

My C program question error message showing up conio in addition of matrices

https://code.sololearn.com/cDIHpsEE18R9/?ref=app

9th Jan 2020, 12:20 PM
Miss RoShAni Sharma
2 Respuestas
0
You can not have multiple inputs, that is just SoloLearn thing you have to get used to. So you can get only one input. Note: i have noticed that u use i<=3 in for loops, but your 2d array is [3][3]. Arrays start form zero, so in your case you will loop through 4 rows and 4 columns . Just delete the assignment operator and you will be fine :)
9th Jan 2020, 12:43 PM
Atif Delibašić
Atif Delibašić - avatar
0
Miss RoShAni Sharma canio.h is deprecated header file will not work. So remove that. instead of getch use getchar(); Remove or comment clrscr() ; Make void main() to int main(). a[3][3] contains 3*3 =9 elements. Index starts from 0. so maximum index is a[2][2]. If you access beyond that you get garbage values.. So loop should be like for(i=0;i<3;i++) //not <=3 Inputs give like 2 3 4 5 2 2 2 2 2 2 1 2 2 2 2 2 2 2 All required inputs at one time only...
9th Jan 2020, 5:08 PM
Jayakrishna 🇮🇳