Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- class Problem1
- {
- static void Main()
- {
- int A = int.Parse(Console.ReadLine());
- int B = int.Parse(Console.ReadLine());
- int C = int.Parse(Console.ReadLine());
- long R=0;
- switch (B)
- {
- case 2:
- R = A % C;
- break;
- case 4:
- R = A + C;
- break;
- case 8:
- R = A * C;
- break;
- default:
- break;
- }
- long result;
- if (R%4==0)
- {
- result = R / 4;
- }
- else
- {
- result = R % 4;
- }
- Console.WriteLine(result);
- Console.WriteLine(R);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement