Nesting of For Loop in C/C++

Nesting of For Loop in C/C++


This program is "Nesting of For Loop" and it prints out "*" in a parallel way in C/C++. The program is given below:


#include<iostream>
using namespace std;
int main()
{
int i, j;
for(i=1;i<=5;i++)
{
for(j=1;j<=i;j++)
{
cout << "*";
}
cout << "\n";
}
}

Comments

Popular posts from this blog

Book-Shop Program using C++

Switch statement in C/C++