My own run tests pass but I keep failing in the verify.
Can someone explain why?
package com.codegym.task.task04.task0429;
/*
Positive and negative numbers
*/
import java.io.*;
public class Solution {
public static void main(String[] args) throws Exception {
//write your code here
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
String a1 = reader.readLine();
String b1 = reader.readLine();
String c1 = reader.readLine();
int a = Integer.parseInt(a1);
int b = Integer.parseInt(b1);
int c = Integer.parseInt(c1);
int pos = 0;
int neg= 0;
if(a > 0){
pos+=1;
} else if( a < 0){
neg+=1;
}
if( b > 0){
pos+=1;
} else if( b < 0){
neg+=1;
}
if( c > 0){
pos+=1;
} else if( c < 0){
neg+=1;
}
System.out.println("Number of negative numbers:" + neg);
System.out.println("Number of positive numbers:" + pos);
}
}