Question: int main ( ) ( Scanner input = new Scanner ( System . in ) ; int a , b , c; System out printin,

int main()
(
Scanner input=new Scanner(System.in);
int a, b, c;
System out printin,(Please enter the length of the three sides of the triangle (CM):");
a=input.nextInt();
b=input.nextInt();
c=input.nextInt();
if(a+b<=c || a+c<=b || b+c<=a || abs(a-b)>=c || abs(a-c)>=b || abs(b-c)>=a)
{
System.out.printin("The three sides cannot form a triangle");
}
else
{
if(a==b||a==c|| b==c)
{
if(a==b && b==c)
{
System.out.printin("Equilateral triangle");
}
else
{
System.out.printin("Isosceles triangle");
}
}
else
{
System.out.printin("common triangle");
}
}
return 0;
}
Draw the Control Flow Gragh and find the full complexity

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!