```
import java.util.Scanner;
import java.lang.Math.*;
class ReturnLargest
{
public static void main (String [] args)
{
Scanner keyIn = new Scanner(System.in);
int numA = 0;
int numB = 0;
int largest =0;
int smallest = 0;
System.out.print("Enter an integer: \n");
numA = keyIn.nextInt( );
System.out.print("Enter an integer: \n");
numB = keyIn.nextInt( );
largest = Math.max(numA,numB);
smallest = Math.min(numA,numB);
if((largest>=10&&largest<=20)||(smallest>=10&&smallest<=20)){System.out.println("\n"+largest);}else{System.out.println("\n0");}
}
}
```

re: Your comment : if you mean this : if (b > a) {

Both ints need to be checked for range, and you then need to know which is the largest.