Input Range Even Numbers


Submit solution

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

Authors:
Problem type

題目說明

請撰寫一個程式,要求使用者輸入兩個整數作為範圍(起始值和結束值),然後輸出範圍內所有的偶數(包含起始值和結束值)。假設起始值總是小於或等於結束值。
(提示 : 利用 for loop)

輸入

兩個整數,第一個為起始值,第二個為結束值。

輸出

輸出範圍內的所有偶數,每行輸出一個偶數。

範例輸入 #1

3 10

範例輸出 #1

4  
6  
8  
10

範例輸入 #2

0 7

範例輸出 #2

0  
2  
4  
6

Comments

There are no comments at the moment.