insidcode
ProblemsDuelLeaderboardStats
Sign In
  1. Home
  2. Problems
  3. Even Numbers 1 to 100

Even Numbers 1 to 100

Difficulty: Easy

Phase: 2 · Looping and Patterns

XP Reward: 10 XP

Topics: Looping and Patterns, Easy

Supported Languages: Python, JavaScript, C, C++, Java

Problem Description

Print all even numbers between 1 and 100 inclusive, separated by space. Input Format: Read input from standard input (stdin). Output Format: Print the result to standard output (stdout).

Constraints

  • -10^9 <= N <= 10^9

Examples

Example 1

Input:

Output: 2 4 6 8 10 12 14 16 18 20 22 24 26 28 30 32 34 36 38 40 42 44 46 48 50 52 54 56 58 60 62 64 66 68 70 72 74 76 78 80 82 84 86 88 90 92 94 96 98 100

Explanation: Sample execution for input (no input)