Lucian_Adrian

Untitled

Sep 7th, 2021
32
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.43 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. int main()
  6. {
  7. int n, i, m;
  8. cin>>n;
  9. for ( i = 1; i <= n; ++i) {
  10. for ( m = 1; m <= i; ++m)
  11. cout << '*';
  12. cout << '\n';
  13. }
  14. for (i = 1; i <= n; ++i) {
  15. for (m = 1; m <= 2 * n; ++m)
  16. if (m >= n + i)
  17. cout << '*';
  18. else
  19. cout << ' ';
  20. cout << '\n';
  21. }
  22. return 0;
  23. }
  24.  
Advertisement
Add Comment
Please, Sign In to add comment