006-001-008
For Loop: Print 1 to 5
Easy
Problem Description
for loop: Print 1 to 5
In this problem, you will create a program that uses a for loop to iterate from 1 to 5 and displays each integer on a separate line to standard output.
Learning Objective: Understand basic for loop syntax and implement iteration
Overview
Create a program that prints numbers from 1 to 5 using a for loop.
Specifications
- Use a for loop for repetition
- Output integers from 1 to 5, one per line
Output Format
1
2
3
4
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