| 2 | package largestNum; |
| 3 | import java.util.Scanner; |
| 4 | public class LargestNum { |
| 5 | public static void main(String[] args) { |
| 6 | // TODO Auto-generated method stub |
| 7 | double x; |
| 8 | double y; |
| 9 | Scanner sc = new Scanner(System.in); |
| 10 | System.out.println("Enter first number: "); |
| 11 | x = sc.nextDouble(); |
| 12 | System.out.println("Enter second number: "); |
| 13 | y = sc.nextDouble(); |
| 14 | if (x > y) { |
| 15 | System.out.println("X is greater than Y."); |
| 16 | } |
| 17 | else if (y > x) { |
| 18 | System.out.println("Y is greater than X"); |
| 19 | } |
| 20 | else { |
| 21 | System.out.println("X and Y are equal."); |
| 22 | } |
| 23 | } |
| 24 | } |
nothing calls this directly
no outgoing calls
no test coverage detected