You are viewing a single comment's thread. Return to all comments →
If you're dong this in C there's no point in doing the ascii to number conversion, use scanf(" %c",&array[x][y]);
You can take advantage of the fact that ascii 'X' > ascii'9' > ascii '1' and just compare the chars directly.
Basically there is no need to convert them in any language, since comparison of characters leads to same conclusion. Any language will consider "12" > "13" as falsy. And "9" > "8" as truthy.