is it compulsory to write int width in the first while loop and not in the starting if yes then why?