public class Solution {
public static int negativeNamber = 0;
public static int pasitiveNamber = 0;
public static void main(String[] args) throws Exception {
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
String string = reader.readLine();
String [] strings = string.split(" ");
for (int i = 0; i< strings.length ; i++){
if (Integer.parseInt(strings[i]) < 0)negativeNamber ++;
else if (Integer.parseInt(strings[i]) > 0) pasitiveNamber++;
}
reader.close();
System.out.println("количество отрицательных чисел: "+negativeNamber);
System.out.println("количество положительных чисел: "+pasitiveNamber);
//напишите тут ваш код
}
}package com.javarush.task.task04.task0429;
/*
Положительные и отрицательные числа
*/
import java.io.*;
public class Solution {
public static int negativeNamber = 0;
public static int pasitiveNamber = 0;
public static void main(String[] args) throws Exception {
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
String string = reader.readLine();
String [] strings = string.split(" ");
for (int i = 0; i< strings.length ; i++){
if (Integer.parseInt(strings[i]) < 0)negativeNamber ++;
else if (Integer.parseInt(strings[i]) > 0) pasitiveNamber++;
}
reader.close();
System.out.println("количество отрицательных чисел: "+negativeNamber);
System.out.println("количество положительных чисел: "+pasitiveNamber);
//напишите тут ваш код
}
}