Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <cstdio>
- #include <conio.h>
- using namespace std;
- int main()
- {
- do
- {
- int n;
- cout << "Ile wierszy? ";
- cin >> n;
- for (int i = 0; i < n ; i++)
- {
- for (int j = 0; j <= 2 * i - j; j++)
- cout << ' ';
- for (int j = 0; j < 2 * n - 2 * i - 1 ; j++)
- cout << '*';
- cout << endl;
- }
- }
- while (getch()!=4);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment