Unable to get the print statement on when the value is 1

@aravind.doha I moved your post into your own topic as the one you put your “me too” into was almost a year old.

I also properly formatted your code as required in the Welcome Topic… please read it thoroughly.