Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace Problem26
- {
- class Program
- {
- static void Main(string[] args)
- {
- string tekst;
- while ((tekst = Console.ReadLine()) != null)
- {
- string[] tab = tekst.Split(' ');
- int a = int.Parse(tab[1]);
- int b = int.Parse(tab[2]);
- switch (tab[0])
- {
- case "+":
- Console.WriteLine(a + b);
- break;
- case "-":
- Console.WriteLine(a - b);
- break;
- case "*":
- Console.WriteLine(a * b);
- break;
- case "/":
- Console.WriteLine(a / b);
- break;
- default:
- Console.WriteLine(a % b);
- break;
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement