-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathLoop05.java
More file actions
41 lines (22 loc) · 718 Bytes
/
Loop05.java
File metadata and controls
41 lines (22 loc) · 718 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
package javaAssignment;
import java.util.Scanner;
public class Loop05 {
public static void main(String[] args) {
// TODO Auto-generated method stub
//Que.5:Write a program to print largest number among three numbers
int a, b, c;
Scanner in=new Scanner (System.in);
System.out.println("Enter a:");
a= in.nextInt ();
System.out.println("Enter b:");
b=in.nextInt ();
System.out.println("Enter c:");
c=in.nextInt ();
if(a > b && a > c) {
System.out.println("a is big number");
} else if(b> a && b > c) {
System.out.println("b is big number");
} else
System.out.println("c is big number");
}
}