Example: Numbers from 1 to 100

Write a program that prints the numbers from 1 to 100. The program does not accept input and prints the numbers from 1 to 100 sequentially, each on a separate line.

Video: Numbers 1...100

Watch the video lesson to learn how to print the numbers from 1 to 100 using a for-loop: https://youtu.be/pui8KxT\_uPI.

Hints and Guidelines

We can solve the problem using a for loop, via which we will pass through the numbers from 1 to 100 using the i variable, and print the numbers in the body of the loop:

Start the program using [Ctrl+F5] and test it:

Testing in the Judge System

Test your solution here: https://judge.softuni.org/Contests/Practice/Index/510#0.

You should get 100 points (fully accurate solution).

results matching ""

    No results matching ""