0
Find where i went wrong in my code?
The code is to rotate the square matrix by 90 degrees clockwise. Iam not getting the desired result. I don't know where i went wrong in my code. Could any please help me? https://code.sololearn.com/cd6shOgrE59N/?ref=app
3 Respuestas
+ 1
Okay, it turns out that was the only bug you had, so just look at the top of the code whare the arrays are declared. You need to first scanf for N, then use N to declare both of your arrays. I tested the rotation and it looks good!
https://code.sololearn.com/ct36Rt8USAS0/?ref=app
+ 2
I didn't read past the first line in main. You declare the variable N, but then use it to declare the b array without defining it first. Scanf N before using it to define the b array. I'll read the rest in the morning if someone hasn't helped already :)
+ 1
Zeke Williams Thank you