Print numeric pattern using nested for loop
Code:
#include<iostream>
using namespace std;
void main()
{
//Print numeric pattern using nested for loop..
for( int row=5; row>=1; row--) //this loop control rows......
{
for(int clm=1; clm<=row; clm++) //this loop control columns....
{
cout<<row;
}
cout<<endl; //transfer control to next line
}
system("pause");
}
Comments
Post a Comment