Tom Kelliher, CS17
Mar. 27, 1996
The program should accept positive integers from the user, asking them if they want to continue, and output the factorial of the input.
C(n,r) is the number of ways in which r objects can be drawn from a set of n objects, assuming that order doesn't matter. The user interface of this program should be similar to the previous one. I.e., accept input for several computations, ask the user if they want to continue, etc.
Welcome to the game of Guess It! I will choose a number between 1 and 100. You will try to guess that number. If you guess wrong, I will tell you if you guessed too high or too low. You have 6 tries to get the number. OK, I am thinking of a number. Try to guess it. Your guess? 50 Too high! Your guess? 12 Too low! Your guess? 112 Illegal guess. Your guess must be between 1 and 100. Try again. Your guess? 23 **** CORRECT **** Want to play again? y OK, I am thinking of a number. Try to guess it. Your guess? 23 **** CORRECT **** Want to play again? n Goodbye, it was fun. Play again soon.