Решение
using System;
namespace _2_4_8 {
class Program {
static void Main() {
decimal a = decimal.Parse(Console.ReadLine());
decimal b = decimal.Parse(Console.ReadLine());
decimal c = decimal.Parse(Console.ReadLine());
decimal r = 0;
switch ((int) b) {
case 2:
r = a % c;
break;
case 4:
r = a + c;
break;
case 8:
r = a * c;
break;
}
int remainder = r % 4;
if (remainder == 0) {
Console.WriteLine(r / 4);
} else {
Console.WriteLine(remainder);
}
Console.WriteLine(r);
}
}
}