I have an assignament due tomorrow
the assignament is basically for begginers, we have to build a logical statement calculator:
the statement is from the form (variable2 operation variable1)
the operations in the statements are : '>', '<', '='
and between two or more statement the logical operations could be :
'|' (or) , '&' (and) '~' (not)
if the input was ((a>b)&(1>2)|(5=3)) the function should return 0.
and therse no restriction on how many statements there could be
PS: we are not allowed to use strings or arrays.
examples for outputs:
~(a>b)The statement is true.
(a>b)&(2<3)The statement is false.
(2>3)|~(a>b)&(C>d)The statement is false.
(200>100)The statement is true.
(b=B)The statement is true.