Advertisement
Guest User

Untitled

a guest
Feb 24th, 2020
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.32 KB | None | 0 0
  1.  
  2. int i, j, n, h;
  3. cout << "N=";
  4. cin >> n;
  5. for (i = 1; i<n; i++) {
  6. for (j = 1; j<n; j++)
  7. {
  8. if(i>=j)
  9. cout << "*";
  10. else
  11. cout <<" ";
  12. }
  13. cout <<endl;
  14. }
  15.  
  16.  
  17. for (i = 1; i<n; i++) {
  18. for (j = 1; j<n; j++)
  19. {
  20. if(i<=j)
  21. cout << "*";
  22. else
  23. cout <<" ";
  24. }
  25. cout <<endl;
  26. }
  27. cin >>n;
  28. return 0;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement