• + 1 comment

    That works, but it's easier to do using string (or char array) because you can easily assign a cell to 'X' if it's a cavity, which would be a better approach (in my opinion). Moreover, comparing characters works fine as well since ascii value '9' > '8' > '7' > ...