11171: 4.1 统计正数和负数的个数然后计算这些数的平均值
Memory Limit:128 MB
Time Limit:1.000 S
Judge Style:Text Compare
Creator:
Submit:1
Solved:0
Description
编写程序,读入未指定个数的整数,判定读入的正数有多少个,读入的负数有多少个,然后计算这些输入值的总和及其平均值(不对0计算)当输入为0时,表明程序结束。将平均值以浮点数显示(小数点后保留2位四舍五入)。
Input
输入若干个整数
Output
输出:
The number of positives is 正数个数
The number of negatives is 负数个数
The total is 数的总和
The average is 数的平均数
Sample Input Copy
1 2 -1 3 0
Sample Output Copy
The number of positives is 3
The number of negatives is 1
The total is 5
The average is 1.25