14 lines
318 B
C++
14 lines
318 B
C++
// forloop.cpp -- introducing the for loop
|
|
#include <iostream>
|
|
int main()
|
|
{
|
|
using namespace std;
|
|
int i; // create a counter
|
|
// initialize; test ; update
|
|
for (i = 0; i < 5; i++)
|
|
cout << "C++ knows loops.\n";
|
|
cout << "C++ knows when to stop.\n";
|
|
// cin.get();
|
|
return 0;
|
|
}
|