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 __3_6_9
- {
- class Program
- {
- static void Main()
- {
- long a = long.Parse(Console.ReadLine());
- long b = long.Parse(Console.ReadLine());
- long c = long.Parse(Console.ReadLine());
- long r = new long();
- long result = new long();
- if (b == 3)
- {
- r = a + c;
- }
- else if (b == 6)
- {
- r = a * c;
- }
- else if (b == 9)
- {
- r = a % c;
- }
- else
- {
- Console.WriteLine("bullshit");
- }
- if (r % 3 == 0)
- {
- result = r / 3;
- }
- else
- {
- result = r % 3;
- }
- Console.WriteLine(result);
- Console.WriteLine(r);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement