Computer Science, asked by Kritagyan4555, 1 year ago

Write a program in qbasic to accept three numbers and check whether they are Pythagorean triplet. The program must display the message accordingly

Answers

Answered by Anonymous
4


                               import java.util.*;



{


    public 


static


 void main(String args)


    {
        Scanner sc= new Scanner(System.in);


        int a,b,c;


        System.out.println("Enter the three numbers");




        a=sc.nextInt();


        b=sc.nextInt();


        c=sc.nextInt();


        if(a*a+b*b==c*c)

        System.out.println("Pythagorean Triple");

        else
        System.out.println("Not Pythagorean Triple");



         
    }


}

Kritagyan4555: Not in java
Similar questions