-
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathIf30.java
More file actions
22 lines (20 loc) · 729 Bytes
/
If30.java
File metadata and controls
22 lines (20 loc) · 729 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
package ifdirect;
import java.util.Scanner;
public class If30 {
public static void main(String[] args) {
Scanner scanner = new Scanner (System.in);
int a, b;
System.out.print ("a:");
a = scanner.nextInt ( );
b = a % 2;
if ( a > 9 && a <= 99 && b == 0 ) {
System.out.println ("2 Xonali Juft");
} else if ( a > 99 && a <= 999 && b == 0 ) {
System.out.println ("3 Xonali Juft");
} else if ( a > 9 && a <= 99 && b == 1 ) {
System.out.println ("2 Xonali Toq");
} else if ( a > 99 && a <= 999 && b == 1 ) {
System.out.println ("3 Xonali Toq");
} else System.out.println ("chota ne tooo");
}
}