├── .gitignore ├── Main.java └── README.md /.gitignore: -------------------------------------------------------------------------------- 1 | # Compiled class file 2 | *.class 3 | 4 | # Log file 5 | *.log 6 | 7 | # BlueJ files 8 | *.ctxt 9 | 10 | # Mobile Tools for Java (J2ME) 11 | .mtj.tmp/ 12 | 13 | # Package Files # 14 | *.jar 15 | *.war 16 | *.nar 17 | *.ear 18 | *.zip 19 | *.tar.gz 20 | *.rar 21 | 22 | # virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml 23 | hs_err_pid* 24 | replay_pid* 25 | -------------------------------------------------------------------------------- /Main.java: -------------------------------------------------------------------------------- 1 | import java.util.*; 2 | public class Main 3 | { 4 | public static void main(String[] args) { 5 | Scanner sc=new Scanner(System.in); 6 | int n1=sc.nextInt(); 7 | int n2=sc.nextInt(); 8 | int n3=sc.nextInt(); 9 | 10 | if((n1>n2) && (n1>n3)){ 11 | System.out.print(n1+" is greater"); 12 | } 13 | else if((n2>n1) &&(n2>n3)){ 14 | System.out.println(n2+" is greater"); 15 | } 16 | else{ 17 | System.out.print(n3+" is greater"); 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Greatest-Number-Among-Three-Numbers--Java 2 | Given three integers num1, num2 and num3 as inputs. The objective is to write a code to Find the Greatest of the Three Numbers in Java Language. To do so we’ll check the numbers with each other and print the largest of them all. 3 | --------------------------------------------------------------------------------