0
char square[10]={'1','2','3,'4','5','6','7','8','9'}; int choice; printf ("input choice "); if(square[choice]==choice){...}
5 Answers
+ 1
Buma Emmanuel
Which Problem it is? Please mention language and task from where did you find it
0
Buma Emmanuel
What you want to ask?
0
That does work but this does,for example
If(choice==1&&square[1]=='1'){âŚ}
0
*the code in question does not work but what i just sent works
0
Im creating tictactoe game in c language,it works when i give cases for when choice equals any of the squares from 1 to 9,but i wanted to compress all that to just one if statement instead of nine that is why i tried that method above but it doesnt work , so im just asking to know why