Yes, he was right. Welcome to the Ranch
I am afraid your code is illegible because you haven't indented or spaced it out properly. We have some suggestions
here.
if(c==49){c=1;} is particularly difficult to read. It also suggests there is a much simpler and more elegant way to convert those
chars to
ints.