public static void Main()
Console.WriteLine("What gate would you like to try? (Enter AND, OR, NOT, NAND, NOR or EXOR)");
whichgate = Console.ReadLine();
Console.WriteLine("What is the first input? (Enter 0 or 1)");
int ainputand = int.Parse(Console.ReadLine());
Console.WriteLine("What is the second input? (Enter 0 or 1)");
int binputand = int.Parse(Console.ReadLine());
if ((ainputand == 1) && (binputand == 1))
Console.WriteLine(output);
Console.WriteLine(output);
else if (whichgate == "OR")
Console.WriteLine("What is the first input? (Enter 0 or 1)");
int ainputor = int.Parse(Console.ReadLine());
Console.WriteLine("What is the second input? (Enter 0 or 1)");
int binputor = int.Parse(Console.ReadLine());
if ((ainputor == 0) && (binputor == 0))
Console.WriteLine(output);
Console.WriteLine(output);
else if (whichgate == "NOT")
Console.WriteLine("What is the input? (Enter 0 or 1)");
int inputnot = int.Parse(Console.ReadLine());
Console.WriteLine(output);
Console.WriteLine(output);
else if (whichgate == "NAND")
Console.WriteLine("What is the first input? (Enter 0 or 1)");
int ainputnand = int.Parse(Console.ReadLine());
Console.WriteLine("What is the second input? (Enter 0 or 1)");
int binputnand = int.Parse(Console.ReadLine());
if ((ainputnand == 1) && (binputnand == 1))
Console.WriteLine(output);
Console.WriteLine(output);
else if (whichgate == "NOR")
Console.WriteLine("What is the first input? (Enter 0 or 1)");
int ainputnor = int.Parse(Console.ReadLine());
Console.WriteLine("What is the second input? (Enter 0 or 1)");
int binputnor = int.Parse(Console.ReadLine());
if ((ainputnor == 0) && (binputnor == 0))
Console.WriteLine(output);
Console.WriteLine(output);
else if (whichgate == "EXOR")
Console.WriteLine("What is the first input? (Enter 0 or 1)");
int ainputexor = int.Parse(Console.ReadLine());
Console.WriteLine("What is the second input? (Enter 0 or 1)");
int binputexor = int.Parse(Console.ReadLine());
if (((ainputexor == 0) && (binputexor == 0)) || ((ainputexor == 1) && (binputexor == 1)))
Console.WriteLine(output);
Console.WriteLine(output);