Print Even Numbers in a Range


Submit solution

Points: 10
Time limit: 1.0s
Memory limit: 10M

Author:
Problem type

Description

請撰寫一個程式,輸入兩個整數 ac (0 ≤ a ≤ c ≤ 100),並輸出在區間 a ~ c (含邊界) 之間的所有偶數。

Requirements

  1. 輸入

    • 兩個整數 a, c 且已知 0 ≤ a ≤ c ≤ 100
  2. 規則

    • 輸出區間內所有偶數,包含 ac
    • 保證至少有 1 個偶數,最多不超過 10 個
  3. 輸出

    • 所有偶數輸出於同一行且以 一個空格 分隔
    • 最後結尾不可多印空格

Input and Output

Sample 1 Sample 2 Sample 3
INPUT 2 11 0 0 3 9
OUTPUT 2 4 6 8 10 0 4 6 8

Comments

There are no comments at the moment.