logic - About the Bicondition in java -
i'm trying write program truth table logic. truth table biconditional: need help. how can when write true <=> false return right result "true" or "false". sorry bad english.
you can make logic using equals
operator.
import java.util.*; class biconditional { public static void main(string[] args) { scanner s=new scanner(system.in); string p=s.next(); string q=s.next(); if(p.equals(q)) system.out.println("true"); else system.out.println("false"); } }
you can change user input , equality operator when inputting in 0
or 1
.
wiki
Comments
Post a Comment