• + 2 comments

    %1d signifies read 1 digit at a time. If you write %d, one entire row of digits will be read at once, which is not what you want.