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