import java.io.*; class TwoNums3 { // A program that prompts for two numbers then prints the difference between // the two squares. Uses a separate function to find it. public static void main (String[] args) throws IOException { int m,n,d; BufferedReader in = Text.open(System.in); System.out.print("Enter first number: "); m=Text.readInt(in); System.out.print("Enter second number: "); n=Text.readInt(in); d=diffTwoSquares(m,n); System.out.println("The difference between the two squares is: "+d); } public static int diffTwoSquares(int p,int q) { int r; r=p*p-q*q; return r; } }