Write a program that announces at each repetition of a loop the number of times it has executed the loop. Have it stop at each execution with the message.
Type ‘more’ to continue
Bulletproof it so that it doesn’t matter whether ‘more’ is entered in upper or lower case, or whether they misspell the word after the first letter.
A sample execution would be:
Loop execution number 1
Type ‘More’ to continue More
Loop execution number 2
Type ‘More’ to continue More
Loop execution number 3
Type ‘More’ to continue Stop
Comments
Leave a comment