Created
July 29, 2020 21:18
-
-
Save Hafiz-SE/2e1ab25103209d70006a9c09e60d8915 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.Scanner; | |
class MyClass { | |
public static void main(String[] args) { | |
Scanner in = new Scanner(System.in); | |
System.out.println ("Please Enter First Value : "); | |
int a = in.nextInt(); | |
System.out.println ("Please Enter Second Value : "); | |
int b = in.nextInt(); | |
System.out.println ("Please Enter Third Value : "); | |
int c = in.nextInt(); | |
if (a<b) { | |
if (c<b) { | |
System.out.println("Second value is the greatest."); | |
} else { | |
System.out.println("Third value is the greatest."); | |
} | |
} else { | |
if (a<c) { | |
System.out.println("Third value is the greatest."); | |
} else { | |
System.out.println("First value is the greatest."); | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment