1. Course
  2. Flow controls B
  3. Repetitive structures

Repetitive structures


Last updated: 8/22/2020 Difficulty: Intermediate

Create a C# program that asks the user for two integers (x, y) and shows the range of those numbers (the two included), in three different ways:

  • Using the for statement.
  • Using the while statement.
  • Using the do while instruction.

Input

6
12

Output

6 7 8 9 10 11 12
6 7 8 9 10 11 12
6 7 8 9 10 11 12

Solution

Flow controls B

7 / 8

Android App


Practice C# anywhere with the free app for Android devices.

Android App

Exercises C# by difficulty


Learn C# at your own pace, the exercises are ordered by difficulty.

Make a donation


Your donations support our work and contribute to the maintenance of the app.

Advertising