+ 1
It’s not that hard at all, you get user input of 2 numbers and which operator to do (+, -, /, *) and then give them the result, a simple example (C#) public void main() { int x; int y; string op; while(true) { Console.WriteLine(“num: “) x = int.parse(Console.ReadLine()); Console.WriteLine(“num2: “) y = int.Parse(Console.ReadLine()); Console.WriteLine(“operator: “) op = Console.ReadLine(); Console.WriteLine(calc(x, y, op); } } private double calc(int x, int y, string op) { int res; switch(op) { case “+”: res = x + y; break; case “-“: res = x - y; break; case “/“: res = x / y; break; case “*”: res = x * y; break; } return res; }
10th Jan 2019, 10:44 PM
Joery De Loose
Joery De Loose - avatar
+ 1
In what language.
10th Jan 2019, 12:06 PM
africana
africana - avatar