int poscount=0;
int negcount=0;
for(int i=0;i<3;i++){
BufferedReader reader=new BufferedReader(new InputStreamReader(System.in));
if(Integer.parseInt(reader.readLine())>0)
poscount++;
else if(Integer.parseInt(reader.readLine())<0)
negcount++;
}
System.out.println("Number of negative numbers: "+negcount);
System.out.println("Number of positive numbers: "+poscount);

package en.codegym.task.jdk13.task04.task0429;
import java.io.BufferedReader;
import java.io.InputStreamReader;
/*
Positive and negative numbers
*/
public class Solution {
public static void main(String[] args) throws Exception {
//write your code here
int poscount=0;
int negcount=0;
for(int i=0;i<3;i++){
BufferedReader reader=new BufferedReader(new InputStreamReader(System.in));
if(Integer.parseInt(reader.readLine())>0)
poscount++;
else if(Integer.parseInt(reader.readLine())<0)
negcount++;
}
System.out.println("Number of negative numbers: "+negcount);
System.out.println("Number of positive numbers: "+poscount);
}
}

else ifmais seulement else