Professional Documents
Culture Documents
'Logic Gate
'Write a program that will give the students the answer To logic gate questions
'For example:
'Enter logic gate : Or
'Enter first input : 1
'Enter second input : 0
'Result = 1
'It should work For the logic gates Or, And, Xor, NAND And NOR
Module Program
Console.WriteLine("LOGIC GATES")
Console.WriteLine("")
If L_Gate = 1 Then
'if 1 AND
Console.WriteLine("The LOGIC GATE selected is AND GATE.")
Console.WriteLine("")
correct:
correct1:
correct2:
correct3:
If Input_1 = 1 Or 0 Then
GoTo correct3
Else
Console.WriteLine("")
Console.WriteLine("Wrong Input! Please input either 1 or 0")
GoTo Tem
End If
correct4:
If Input_1 = 1 Then
Console.WriteLine("")
Console.WriteLine("Output is 0")
Else
Console.WriteLine("")
Console.WriteLine("Output is 1")
End If
correct5:
Else
Console.WriteLine("Wrong Option Selected...")
End If
Tem:
Console.ReadKey()
End Sub
End Module