This is the program I'm working on and I'm completely lost
A Pythagorean triple is a set of numbers A, B, C such that A2 + B2 = C2. Write a subroutine that determines if 3 given numbers are a Pythagorean triple. The subroutine should print out an appropriate comment in each case. Test your solution with these sets; (3, 4, 5) and (7, 2, 9)
This is what I have so far
import java.util.*;
public class {
public static void main(String[] args){
Scanner in = new Scanner(System.in);
System.out.println("Enter a number.");
int num1 = in.nextInt();
System.out.println("Enter a second number.");
int num2 = in.nextInt();
System.out.println("Enter third number.");
int num3 = in.nextInt();
Triple(int num1,int num2,int num3);
}// end main()
static void Triple(int num 1, int num2,int num3 ) {
int square1=int num1* int num1;
int square2=int num2* int num2;
int square3=int num3* int num3;
if (((square1 + square2) == square3){
System.out.println("Good job you got a Pythagorean triple.");}
else{
System.out.println("That was NOT a Pythagorean triple.");
}
Please note I'm using notepad not visual basic or anything like that.
Thanks