Guest User

Choinka version 01

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