-
Notifications
You must be signed in to change notification settings - Fork 0
/
inp_out.java
49 lines (42 loc) · 1.15 KB
/
inp_out.java
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
44
45
46
47
48
49
import java.util.*;
public class inp_out {
public static void main(String[] args){
Scanner r = new Scanner(System.in);
int a = r .nextInt();
//Scanner s = new Scanner(System.in);
int b = r .nextInt();
float sum = a + b;
System.out.println(sum);
if(sum > 18){
System.out.println("Adult.");
}
else{
System.out.println("Not Adult.");
}
if(sum % 2 == 0){
System.out.println("Even");
}else{
System.out.println("Odd");
}
if (a == b) {
System.out.println("a is equal to b.");
}else if (a>b) {
System.out.println("a is greater then b");
} else {
System.out.println("a is less then b.");
}
switch (a) {
case 1:
System.out.println("hI");
break;
case 2:
System.out.println("UHello");
break;
case 3:
System.out.println("Morning");
break;
default:
System.out.println("Failed");
}
}
}