Task 5. Create a program to request two numbers from the user and output the larger of the two numbers.

example:  7 5 → 7

answer

Task 6. Create a program to request two numbers from the user and output the sum of the two numbers.

example:  5 7 → 12

answer

Task 7. Create a program to request two numbers from the user and output the difference between the two numbers.

example:  7 5 → 2

answer

Task 8. Create a program to request one number from the user and output its double.

example:  7 → 14

answer

Task 9. Create a program to request one number from the user and output its triple.

example:  7 → 21

answer

Task 10. Create a program to request two numbers from the user and output the product of the two numbers.

example:  5 7 → 35

answer

Task 11. Create a program to request one number from the user and output its square.

example:  5 → 25

answer

Task 12. Create a program to request two numbers from the user and output the result of dividing the first number by the second.

example:  27 5 → 5

answer

You might be interested to see how the simplest of programs can make a computer lose its way completely!. Try:

701 802 701

back