current position:Home>Why judge whether the triangle is wrong and how to write it.

Why judge whether the triangle is wrong and how to write it.

2022-02-02 21:23:02 CSDN Q & A

img




Refer to the answer 1:

Discriminant cannot be serialized and written together , Should be written as ((a==b)&&(a!=c))||((c==b)&&(c!=a))||((a==c)&&(a!=b))




Refer to the answer 2:



Refer to the answer 3:

a==b
a==c
b==c
The equals sign is wrong




Refer to the answer 4:



Refer to the answer 5:
if ( a == b && a == c) { 
        return 3;} else if ((a == b && a != c)        || (a == c && a != b)         || (b == c && a != b)) { 
        return 2;} else { 
        return 1;}

Judge here to change




Refer to the answer 6:

copyright notice
author[CSDN Q & A],Please bring the original link to reprint, thank you.
https://en.primo.wiki/2022/02/202202022123004556.html

Random recommended