You are viewing a single comment's thread. Return to all comments →
You can't. What you can do is, do the comparisons and output at the same time, so when you find a cavity, output an X instead of the digit. While you could have read the input as characters and compared and assigned the X, using integers is generally easier to understand, so I would prefer reading the input as integer. But if you want to stick to keeping the processing and output separate, use a 2D character array.