-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathIf.java
More file actions
71 lines (63 loc) · 1.49 KB
/
Copy pathIf.java
File metadata and controls
71 lines (63 loc) · 1.49 KB
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
package com.example.If;
public class If {
public static void pos(int a){
if(a > 0){
System.out.println("Yes");
}
else{
System.out.println("No");
}
}
public static void even(int a){
if(a % 2 == 0){
System.out.println("Even");
}
else{
System.out.println("No");
}
}
public static void character(char a){
if(a >= 65 && a <= 90){
System.out.println("Uppercase");
}
if(a >= 97 && a <= 122){
System.out.println("Lowercase");
}
else{
System.out.println("N/A");
}
}
public static void ten(int a){
if (a % 10 == 0){
System.out.println("Yes");
}
else{
System.out.println("No");
}
}
public static void maximum(double a, double b, double c){
if (a >= b){
if (a >= c){
System.out.println(a);
}
if (a < c){
System.out.println(c);
}
}
if (b > a){
if (b >= c){
System.out.println(b);
}
if (b < c){
System.out.println(c);
}
}
}
public static void main(String[]args){
pos(1);
even(1);
character('a');
ten(100);
maximum(5.0,6.0,7.0);
}
}