Simple Calculator
GlobalSelection
Created by pattakorn.k on Oct 1, 2026
Pseudocode
// PSC:1.0 SimpleCalculator
// Description: Applies +, -, * or / to two numbers using SWITCH
BEGIN SimpleCalculator
INPUT "First number: " a
INPUT "Operator (+, -, *, /): " op
INPUT "Second number: " b
SWITCH op
CASE "+": OUTPUT "Result: " a + b
CASE "-": OUTPUT "Result: " a - b
CASE "*": OUTPUT "Result: " a * b
CASE "/": OUTPUT "Result: " a / b
DEFAULT: OUTPUT "Unknown operator"
END SWITCH
ENDInteractive Preview
Generating flowchart…