What is the error in my code…?

include
using namespace an std;
enum triangleType SCALENE, ISOSCELES, EQUILATERAL, NOTRIANGL
int triangleShape(int the, int b, int c, int t)

if(a+b>ca+c>bb+c>a)

cout<<"its triangle"<<endl;

else if(a! =b && the! =c && b! =c)

t=SCALENE;

else if((a=b) && (b=c) &&( c=a))

t=EQUILATERAL;

else if((a=b)&&(a! =c)&&(b! =c) (a=c) &&(a! =b)&&(b! =c)(b=c)&&(b! =a)&&(c! =a))

t=ISOSCELES;

else
t=NOTRIANGLE;
go back t;

int min()

triangleType to;
int the, b, c, k;
cout<<"enter attitudes of features:";
cin>>a>>b>>c;
k=triangleShape(a, b, c, t);
if(k=0)
cout<<"Scalene"<<endl;
else if(k=1)
cout<<"Isosceles"<<endl;
else if(k=2)
cout<<"Equilateral"<<endl;
else if(k=3)
cout<<"No Triangle"<<endl;

go back 0;

use == intended for comparison
your program will not likely work correctly
then initial if condition is suitable then many other conditions will probably be skipped and you may not be capable to know whether this is the scalene or even other triangle
so remove else in the event from scalene triangle check

You’re employing a single “equals” indication (=) as opposed to the double-equals (==) required for comparisons inside the “if” transactions.

Every D programmer helps make that mistake eventually.

What is your code designed to do.

Leave a Reply