Skip to content

Commit ac713e1

Browse files
Greatest
WAP to find out greatest no. in two no.
1 parent 75e8996 commit ac713e1

1 file changed

Lines changed: 21 additions & 0 deletions

File tree

Greatest

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
import java.util.*;
2+
class p4
3+
{
4+
public static void main(String [] args)
5+
{
6+
int a,b;
7+
Scanner sc=new Scanner(System.in);
8+
System.out.println( "Enter two no.:");
9+
a=sc.nextInt();
10+
b=sc.nextInt();
11+
if(a>b)
12+
{
13+
System.out.println("Greatest no.="+a);
14+
}
15+
else
16+
{
17+
System.out.println("Greatest no.="+b);
18+
19+
}
20+
}
21+
}

0 commit comments

Comments
 (0)