Simple For Loop in C++

Explore the use of a basic for loop in C++ to sequentially process and display numbers within a specified range.

Simple For Loop in C++
Photo by Christian Wiediger / Unsplash

Explore the use of a basic for loop in C++ to sequentially process and display numbers within a specified range.

#include <iostream>

int main() {
    for (int i = 1; i <= 5; ++i) {
        std::cout << "Number: " << i << std::endl;
    }
    return 0;
}