-
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathIf4.java
More file actions
22 lines (17 loc) · 559 Bytes
/
If4.java
File metadata and controls
22 lines (17 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
package ifdirect;
import java.util.Scanner;
public class If4 {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
int a, b, c, counter = 0;
System.out.println("Sonlarni kiriting:");
a = scanner.nextInt();
b = scanner.nextInt();
c = scanner.nextInt();
if (a >= 0) counter++;
if (b >= 0) counter++;
if (c >= 0) counter++;
System.out.printf("Musbarlar soni: %d", counter);
// System.out.println("Musbarlar soni: " + counter);
}
}