Loops

/*This program will demonstrate the for, pretest and
post test loops*/

#include<iostream.h>
main()
{
int k=10, j=3;

//For loop
for(int i = 0; i < 3; i++)
{
    cout << "***\n";
    cout << i << '\n';
}


// Pre Test loop
while (j < 5)
{
    cout << "$$$\n";
    cout << j << '\n';
    j++;



// Post Test loop
do
{
    cout << "###\n";
    cout << k << '\n';
    k++;

while (k < 12);

return 0;
}
/*
***
0
***
1
***
2
$$$
3
$$$
4
###
10
###
11
*/