MCPcopy Create free account
hub / github.com/PrajaktaSathe/Java / LargestNum

Class LargestNum

Programs/largestNum.java:4–24  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2package largestNum;
3import java.util.Scanner;
4public 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}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected