Skip to content

Commit c75ea69

Browse files
authored
Java Programs - Greatest Number among 3
1 parent a967022 commit c75ea69

File tree

1 file changed

+47
-0
lines changed

1 file changed

+47
-0
lines changed

Test20_Greatest_number_amoung3.java

+47
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
package com.test.Basic_Java_Programs;
2+
3+
public class Test20_Greatest_number_amoung3
4+
{
5+
public static void main(String[] args)
6+
{
7+
int a=10, b=50, c= 30;
8+
9+
if (a>b)
10+
{
11+
if (a>c)
12+
{
13+
System.out.println(a);
14+
15+
}
16+
else
17+
{
18+
System.out.println(c);
19+
20+
}
21+
22+
}
23+
else
24+
{
25+
if (b>c)
26+
{
27+
System.out.println(b);
28+
29+
}
30+
else
31+
{
32+
System.out.println(c);
33+
34+
}
35+
36+
}
37+
}
38+
39+
}
40+
41+
42+
/* Output:
43+
*
44+
*
45+
* 50
46+
*
47+
*/

0 commit comments

Comments
 (0)