Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- class ThreeSixNine
- {
- static void Main()
- {
- ulong a = ulong.Parse(Console.ReadLine());
- ulong b = ulong.Parse(Console.ReadLine());
- ulong c = ulong.Parse(Console.ReadLine());
- ulong result =0;
- if (b==3)
- {
- result = a+c;
- }
- else if (b==6)
- {
- result = a*c;
- }
- else if (b==9)
- {
- result = a%c;
- }
- if (result%3==0)
- {
- Console.WriteLine(result/3);
- }
- else
- {
- Console.WriteLine(result%3);
- }
- Console.WriteLine(result);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement