this repo has no description
at master 22 lines 439 B view raw
1val1: float = float(to: input(message: "val1: ")); 2val2: float = float(to: input(message: "val2: ")); 3op: int = input(message: "op (+, -, *, /): "); 4 5match op 6{ 7 "+": { 8 print(message: val1 + val2); 9 } 10 "-": { 11 print(message: val1 - val2); 12 } 13 "*": { 14 print(message: val1 * val2); 15 } 16 "/": { 17 print(message: val1 / val2); 18 } 19 _: { 20 print(message: "Invalid operator!"); 21 } 22}