calculate average


Submit solution

Points: 5 (partial)
Time limit: 1.0s
Memory limit: 64M

Authors:
Problem type

題目說明

輸入一連串個數未定的正數,程式計算其平均

當遇到0或小於0的數字,立即停止計算並輸出結果

輸出結果最多輸出至小數點後第二位,若無小數點後第二位則無需補零

輸入資料限制:輸入數字都是正數,可能包含小數

輸入

一連串整數

輸出

平均

sample input1

1 2 3 5 -1

sample output1

2.75

sample input2

5.5 8.4 5 6.2 2.54 3.14 0

sample output2

5.13

Comments

There are no comments at the moment.