-
Notifications
You must be signed in to change notification settings - Fork 0
Practice Problem 5
Seanti edited this page Mar 26, 2025
·
1 revision
Create a calculator that asks the user to enter two numbers and choose an operation (+ , - , * , /). Use a switch statement to perform the chosen operation.
Enter first number: 10
Enter second number: 5
Choose an operation (+, -, *, /): *
Result: 50
Enter first number: 8
Enter second number: 4
Choose an operation (+, -, *, /): /
Result: 2
Enter first number: 7
Enter second number: 3
Choose an operation (+, -, *, /): %
Invalid operation!