006-001-004

For Loop: Number Sequence

Easy

Problem Description

for loop: Number Sequence

In this problem, you will create a program that uses a for loop to display each integer from a start number to an end number, one per line, in ascending order.

Learning Objective: Repeat specified times with for loop

Create a program that inputs start and end numbers and displays numbers in that range sequentially. Display the sequence using a for loop.

Input

Line 1: Start number (integer)
Line 2: End number (integer)

Output

[start]
[start+1]
...
[end]
```java

## Examples

### Example 1: 1 to 5
Input:
```java
1
5
```java
Output:
```java
1
2
3
4
5
```java

### Example 2: 10 to 13
Input:
```java
10
13
```java
Output:
```java
10
11
12
13
```java

### Example 3: Same value (only once)
Input:
```java
5
5
```java
Output:
```java
5

Ready to Try Running Code?

Log in to access the code editor and execute your solutions for this problem.

Don't have an account?

Sign Up