-
Notifications
You must be signed in to change notification settings - Fork 0
Practice Problem 3
Seanti edited this page Mar 26, 2025
·
1 revision
Create a program that asks the user for two numbers and then calculates and displays:
-
Sum
-
Difference
-
Product
-
Quotient (handle division by zero properly)
-
Remainder
Enter first number: 15
Enter second number: 4
Sum: 19
Difference: 11
Product: 60
Quotient: 3
Remainder: 3
If the user tries to divide by zero:
Enter first number: 10
Enter second number: 0
Division by zero is not allowed.