Advertisement
Guest User

Untitled

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