sahajjain01

Display pattern #1

Aug 21st, 2013
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.23 KB | None | 0 0
  1. /* Program to display the following pattern:
  2. 1
  3. 12
  4. 123
  5. 1234
  6. 12345
  7. */
  8. #include<iostream.h>
  9. #include<conio.h>
  10. void main()
  11. {
  12.     clrscr();
  13.     for(int i=1;i<=5;i++)
  14.     {
  15.         for(int j=1;j<=i;j++)
  16.         cout<<j;
  17.         cout<<endl;
  18.     }
  19.     getch();
  20. }
Advertisement
Add Comment
Please, Sign In to add comment