Advertisement
Guest User

Untitled

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