I have not done validation of input k in this video, becaus I am not concerned with the input, all I wanted is to explain the logic in a smile mannerism!😊 just add if(k>0){ Continue with my program } else{ Print("invalid input"); System.exit(0); } I am unable to show program execution because I am not able to record audio in my laptop. Need to get it fixed!