Advertisement
S_h_u_v_r_o

pattern

Oct 26th, 2018
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.37 KB | None | 0 0
  1. /* *
  2. ***
  3. ***** */
  4.  
  5. #include<stdio.h>
  6. int main()
  7. {
  8. int a,b,x,e,d=1;
  9. scanf("%d",&x);
  10. e=x;
  11. for(a=0;a<x;a++)
  12. {
  13. e--;
  14. for(b=0;b<e;b++)
  15. {
  16. printf(" ");
  17. }
  18.  
  19. for(b=0;b<d;b++)
  20. {
  21. printf("*");
  22. }
  23. printf("\n");
  24. d+=2;
  25. }
  26.  
  27. return 0;
  28. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement