CCCPaste

fe2d9c9c6239f

int a, b, c;
Console.Write("a = ");
a = Convert.ToInt16(Console.ReadLine());
while (a > 1 || a < 0)
{
Console.WriteLine("a принимает значение в виде 0 или 1");
Console.Write("a = ");
a = Convert.ToInt16(Console.ReadLine());
}
Console.WriteLine("1. →");
Console.WriteLine("2. ∧");
c = Convert.ToInt16(Console.ReadLine());
while (c > 1 || c < 0)
{
Console.WriteLine("Не существует такого действия." + "\r\n" + "Повторите попытку:");
c = Convert.ToInt16(Console.ReadLine());
}
Console.Write("b = ");
b = Convert.ToInt16(Console.ReadLine());
while (b > 1 || b < 0)
{
Console.WriteLine("b принимает значение в виде 0 или 1");
Console.Write("b = ");
b = Convert.ToInt16(Console.ReadLine());
}

if (a == 0 && b == 0)
{
if (c == 1) Console.WriteLine("Ответ. 1");
if (c == 2) Console.WriteLine("Ответ. 0");
}
if (a == 0 && b == 1)
{
if (c == 1) Console.WriteLine("Ответ. 1");
if (c == 2) Console.WriteLine("Ответ. 0");
}
if (a == 1 && b == 0) Console.WriteLine("Ответ. 0");
if (a == 1 && b == 1) Console.WriteLine("Ответ. 1");