1
22
333
....
#include<iostream.h>
#include<conio.h>
void main()
{
int i,num,j;
clrscr();
cout<<"Enter number for corresponding output:- ";
cin>>num;
for(i=1;i<=num;i++)
{
for(j=1;j<=i;j++)
{
cout<<i;
}
cout<<"\n";
}
num--;
getch();
}
22
333
....
#include<iostream.h>
#include<conio.h>
void main()
{
int i,num,j;
clrscr();
cout<<"Enter number for corresponding output:- ";
cin>>num;
for(i=1;i<=num;i++)
{
for(j=1;j<=i;j++)
{
cout<<i;
}
cout<<"\n";
}
num--;
getch();
}
0 comments:
Post a Comment