79076442

Date: 2024-10-10 23:45:56
Score: 1
Natty:
Report link
  1. Start program
  2. Display Menu: -Option 1: Addition -Option 2: Subtraction -Option 3: Multiplication -Option 4: Division -Option 5: Exit
  3. Repeat Until User chooses exit: 1. Prompt User for choice 2. Read User Input (choice) 3. If choice is 5: -Display "Exiting Program" -End Program 4. Else if choice is between 1 and 4: 1. Prompt User for First Number (num1) 2. Prompt User for Second Number (num2) 3. If choice is 1: -result = num1 + num2 -Display "result of Addition: " + result 4.Else if choice is 2: -result = num1 - num2 -Display "Result of Subtraction: " + result 5. Else if choice is 3: -result = num1 * num2 -Display "Result of Multiplication: " + result 6. Else if choice is 4: -If num2 == 0: -Display "Error: Division by zero is not allowed." -Else: -result = num1 / num2 -Display "Result of Division: " + result 5. Else: - Display "Error: Invalid choice. Please select a valid option."
  4. End Program
Reasons:
  • Long answer (-0.5):
  • No code block (0.5):
  • Low reputation (1):
Posted by: Valasi Urima