Why output is not printing?

please check

Hi @uthyasani you are changing the value of i inside the for loop, then how will the for loop work correctly? I have modified your code here