Hi, I checked witn negative, positive and mixed numners.
code seems to work good, but not accepting task
package com.codegym.task.task04.task0429;
/*
Positive and negative numbers
*/
import java.io.*;
public class Solution {
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());
int numP = 0;
int numN = 0;
if(a<=0)
numN++;
if(b<=0)
numN++;
if(c<=0)
numN++;
System.out.println("Number of negative numbers:" + numN);
// if(a>0 && b>0 && c>0)
// System.out.println("Number of negative numbers: 0");
if(a>0)
numP++;
if(b>0)
numP++;
if(c>0)
numP++;
System.out.println("Number of positive numbers:" + numP);
// if(a<0 && b<0 && c<0)
// System.out.println("Number of positive numbers: 0");
}
}