This Program prints pattern Using C language.


SUBMITTED BY: Nrupeshsinh

DATE: June 26, 2016, 4:01 a.m.

FORMAT: C

SIZE: 251 Bytes

HITS: 351

  1. # include<stdio.h>
  2. # include<conio.h>
  3. void main()
  4. {
  5. int i,j,k=1,l=1,n=4;
  6. clrscr();
  7. for(i=1;i<=n;i++)
  8. {
  9. l=k;
  10. for(j=1;j<=i;j++)
  11. printf("%d",l++);
  12. k=l--;
  13. for(j=1;j<i;j++)
  14. printf("%d",--l);
  15. printf("\n");
  16. }
  17. getch();
  18. }

comments powered by Disqus