Advertisement
Guest User

Untitled

a guest
Dec 15th, 2017
52
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.44 KB | None | 0 0
  1. #include <iostream>
  2. #include <cstdio>
  3.  
  4. using namespace std;
  5.  
  6. int main()
  7. {
  8. int i,j;
  9.  
  10. int n = 20;
  11.  
  12. for(i=1;i<=n;i++)
  13. {
  14. for(j=1;j<=n-i;j++)
  15. {
  16. cout<<" ";
  17. }
  18. for(j=n-i+1;j<=n;j++)
  19. {
  20. cout<<"*";
  21. }
  22. for(j=n+1;j<n+i;j++)
  23. {
  24. cout<<"*";
  25. }
  26. cout<<endl;
  27. }
  28. getchar();
  29. getchar();
  30. return(0);
  31. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement