Write a program to display number pattern 2

//this is a program to display number pattern 2
#include<iostream>
#include<conio.h>

using namespace std;

int main()
{
int i,j;

cout<<"\n\nDisplaying the number pattern: \n\n";

for(i=1;i<=4;i++)
{
cout<<"\n";
for(j=1;j<=i;j++)
{
cout<<" "<<i;
}

}

return 0;

}

Previous
Next Post »