Всем доброго времени суток! Подскажите пожалуйста тугодуму как ИСКЛЮЧИТЬ ЭТОТ ..... НОЛЬ)! Уже час зависаю на этой ерунде)
package com.javarush.task.task04.task0429;
/*
Положительные и отрицательные числа
*/
import java.io.*;
public class Solution {
private int posotive = 0;
private int negative = 0;
public static void main(String[] args) throws Exception {
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
int a = Integer.parseInt(reader.readLine());
int b = Integer.parseInt(reader.readLine());
int c = Integer.parseInt(reader.readLine());
Solution solution = new Solution();
if(!(a == 0 && b == 0 && c ==0)) {
if (a < 0) {
solution.negative++;
} else solution.posotive++;
if (b < 0) {
solution.negative++;
} else solution.posotive++;
if (c < 0) {
solution.negative++;
} else solution.posotive++;
}
System.out.println("количество отрицательных чисел: " + solution.negative);
System.out.println("количество положительных чисел: " + solution.posotive);
}
}