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;
- using System.Numerics;
- namespace _2_4_8
- {
- class _2_4_8
- {
- static void Main()
- {
- Console.Write("a = ");
- BigInteger a = BigInteger.Parse(Console.ReadLine());
- Console.Write("b = ");
- BigInteger b = BigInteger.Parse(Console.ReadLine());
- Console.Write("c = ");
- BigInteger c = BigInteger.Parse(Console.ReadLine());
- BigInteger R = 0;
- if (b == 2)
- {
- R = a % c;
- }
- if (b == 4)
- {
- R = a + c;
- }
- if (b == 8)
- {
- R = a * c;
- }
- if (R % 4 == 0)
- {
- Console.WriteLine(R / 4);
- }
- else
- {
- Console.WriteLine(R % 4);
- }
- Console.WriteLine(R);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment