Эта Java-программа проверяет, является ли сформированный треугольник прямоугольным треугольником, на основе значений, переданных пользователем.

import java.util.Scanner;
class triangle2     //Program to check if the triangle is right angled.
 {
    int a,b,c; //Variable declaration.
    Scanner ob=new Scanner(System.in);
   triangle2()         //constructor for Variable initialization.
    {
    a=0;
    b=0;
    c=0;
    }
void input()        //Method to input value from user.
    {
        System.out.println("Enter the value of angle 1");
        a=ob.nextInt();
        System.out.println("Enter the value of angle 2");
        b=ob.nextInt();
        System.out.println("Enter the value of angle 3");
        c=ob.nextInt();
    }
void printValues()  //Method to print values.
    {
        System.out.println(" The value of angle 1 is "+a);
        System.out.println(" The value of angle 2 is "+b);
        System.out.println(" The value of angle 3 is "+c);
    }
void calc()         //Method to perform calculations.
For the Most important calculation click here.