Java 代码
import java.util.Scanner;
public class Main
{
public static void main(String[] args)
{
Scanner cin = new Scanner(System.in);
int count = 0;
for (int i = 0; i < 6 ; i++)
{
if (cin.nextDouble() > 0)
count += 1;
}
System.out.println( count + " positive numbers");
}
}