im writing this program for an intro to c class, I was wondering if anyone knows whats wrong with this code? it says theres an error with the first else, if i take the curly brackets out it says theres a problem with all 3 else's. Thanks.
#include <stdio.h>
int main ()
{
int sd1, sd2, sd3;
printf("Please enter the first length: \n");
scanf("%d%*c", &sd1);
printf("Please enter the second length: \n");
scanf("%d%*c", &sd2);
printf("Please enter the third length: \n");
scanf("%d%*c", &sd3);
if (sd1+sd2<sd3||sd2+sd3<sd1||sd1+sd3<sd2);
printf ("This is not a triangle");
else
{
if (sd1==sd2&&sd2==sd3);
printf ("Equilateral Triangle");
else
if (sd1==sd2||sd2==sd3||sd1==sd3);
printf ("Isoselecs Triangle");
else
printf ("Scalene Triangle");
}
return (0);
}