sum of numbers less than 100


Submit solution

Points: 20
Time limit: 1.0s
Memory limit: 64M

Author:
Problem type

題目說明

<1112檢定考題>
設計一程式由鍵盤輸入一連串正整數資料後(以-1當結束),將輸入小於100的偶數累加,將加總結果輸出於螢幕上。

輸入

一連串正整數,以-1結束輸入

輸出

將小於100的偶數加總結果輸出於螢幕上

sample input & output

樣本1 樣本2 樣本3
輸入 100
24
39
16
112
19
67
64
29
-1
99
120
250
300
-1
41
52
32
62
88
-1
輸出 104 0 234

Comments

There are no comments at the moment.