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.
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;
}