You are on page 1of 1

Exercise Question 3

1) Make a program that asks the user for positive values until any value smaller or equal to 0 is entered. Sum
their values excluding this ending negative number.

2) Print the factorial of an integer prompted to the user. Be careful about the corner cases (the extreme cases).

3) Make a program that prompts the user for the number of rows and columns then generates a rectangle with *.

4) The user’s task will be to find that number. Every time a trial is made, the program will tell if the user just
guessed that number, in which case the user won, the game ends. In the other cases, if the guess is smaller,
the program will say “Smaller”, else “Greater”.

You might also like