include <stdio.h>
int main() {
int a,b,c;
scanf(“%d%d%d”,&a,&b,&c);
if(a==b&&a==c&&b==c){printf(“Equilateral”);
}else if (a==b&&a!=c&&b!=c){printf(“Isosceles”);}else{
printf(“Scalene”);}
return 0;
}
include <stdio.h>
int main() {
int a,b,c;
scanf(“%d%d%d”,&a,&b,&c);
if(a==b&&a==c&&b==c){printf(“Equilateral”);
}else if (a==b&&a!=c&&b!=c){printf(“Isosceles”);}else{
printf(“Scalene”);}
return 0;
}
It is not necessary that only the side a should be equal to b so you can better use or operation if(a==b||a==c||b==c). if either one is true then it is a isosceles triangle as per it’s properties. I hope it helped
//tip u dont need to add braces if the next code is just one line in your case printf statments
if(condition)
printf(“string”);// no need of {} braces here
else if
printf(“string”);
else
printf(“string”);
Yep, I know that, but thanks though. However, it is recommended to use braces for better understanding.