-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathhema.java
More file actions
43 lines (31 loc) · 712 Bytes
/
hema.java
File metadata and controls
43 lines (31 loc) · 712 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
42
43
package srimathi;
import java.util.Scanner;
public class hema {
public static void main(String[] args) {
// TODO Auto-generated method stub
Scanner sc= new Scanner(System.in);
System.out.println("Enter value for a:");
int a=sc.nextInt();
System.out.println("Enter value for b:");
int b=sc.nextInt();
{
if(a>b)
{
System.out.println("a is greater than b");
}
else if(a>=b)
{
System.out.println("a is greater than equal b");
}
else if(b>a)
{
System.out.println("b is less than a ");
}
else
{
System.out.println("both are equal");
}
}
sc.close();
}
}