+ 3
Write a program to find weather they are the three sides of a triangle or not?
a,b and c are the three given sides. now find out they are the sides of a triangle or not.
7 Antworten
+ 3
no yr
you guys getting me wrong
lemme explain
for eg
3, 4 and 5 are the given sides.
now check wether they can be a side of a triangle or not?( sum of two sides of a triangle always greater thn its third side)
+ 3
here's my try :-
https://code.sololearn.com/caXwGooCzz7E/?ref=app
+ 3
nyc logic @chirag
+ 2
//somthing like this?
Scanner scn = new Scanner(System.in);
String a,b,c,x;
x = scn.nextLine();
if(x.equals("a") || x.equals("b") ||x.equals("c"))
{
System.out.println(x + " is a side of a triangle");
}
else
{
System.out.println(x + " is not a side of a triangle");
}
+ 2
depends on third side
for eg
4 4 9
these can't be sides of a triangle.
+ 1
hum, what are a,b and C ? 2D points, 3D points ? Arrays of either of those ?
+ 1
why?