The output is displayed as follows:
1
22
333
4444
55555
Select To use this code as it is.. select and copy paste this code into code.cpp file :)
- #include <iostream.h>
- #include <conio.h>
- void main()
- {
- clrscr();
- for (int i=1;i<=5;i++)
- {
- for(int j=1;j<=i;j++)
- cout<<i;
- cout<<"\n";
- }
- getch();
- }
0 comments:
Post a Comment