I get this error on my code:
"parse error (possibly incorrect indentation or mismatched brackets)"
max3 a b c = if a>b && a>c then show a
else if b>a && b>c then show b
else if c>a && c>b then show c
i need to get the higher number between a, b and c
EDIT: After adding the else clause as suggested:
max3 a b c = if a>b && a>c then show a
else if b>a && b>c then show b
else if c>a && c>b then show c
else show "At least two numbers are the same"
now i get this error " parse error on input `if' "
EDITED as suggested!
EDITED: SOLVED, i did with guards like shree.pat18 said! Ty!
maximum [a,b,c]otherwiseworks with guards, not if...else