Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int a, b, ans;
- char operator;
- a = int.Parse(Console.ReadLine());
- b = int.Parse(Console.ReadLine());
- operator = char.Parse(Console.ReadLine());
- switch(operator)
- {
- case '+':
- ans = a+b;
- break;
- case '-':
- ans = a-b;
- break;
- ...
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement