You are viewing a single comment's thread. Return to all comments →
when you use "WHEN A != B OR B != C OR A != C THEN 'Scalene'" why do you use "OR"? shouldn't it be "AND" because ALL 3 sides are not equal? so it will be "WHEN A != B AND B != C THEN 'Scalene'".
WHEN A = B AND B = C THEN 'Equilateral'
WHEN A = B OR B = C OR A = C THEN 'Isosceles'
Why does not A = B = C work for Equilateral? Whats the difference between A = B and B = C?
execute then if A=B then it return boolean value if true then 1 else 0
then it compare 1=c
when execute A=B=C
take as (10=10) return 1 because its true then in next stape it compare
1=10 in next step
and return false
This explanation is not true.
((A=B)=(B=C)) doesnt work.
step 1: ((A=B)=(B=C)) -> (1) = (B=C)
step 2: ((1) = (B=C)) -> (1) = (1)
step 3: (1) = (1) -> 1
But doesnt work
this is simple math logic if A=B and B=C it means A=C....
operator overlosding dont work here
Yes you are right AND should be used instead of OR, but even if you use OR then the test case is been submitted..., how is this possible, or there is a fault in the question?