Menu
Question Index
...

Write a program to find if the given points form a triangle.

Input (Integer, Integer, Integer, Integer, Integer, Integer) Output(boolean)
2, 3, 5, 4, 1, 2 true
7, 5, 9, 19, 0, 0 true
12, 12, 14, 12, 14, 18 true
-8, 4, -4, 2, 4, -2 false
0, -3, 3, -3, 21, -3 false



class IsTriangleOrLine
{
    public static void main(String s[])
    {
        System.out.println("Is triangle : " + isTriangleOrLine(2, 3, 5, 4, 1, 2));

    }


    public static boolean isTriangleOrLine(int x1, int y1, int x2, int y2, int x3, int y3) {
    }
    

}

Doubts

Problems

Topic: Java Methods - Parameter Passing And Scope

Read this topic
Take test on this topic

0
Wrong
Score more than 2 points

© meritcampus 2019

All Rights Reserved.

Open In App