Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main ()
- {
- int j,k,b;
- k = 2;
- int a = 0;
- b = 18;
- int y = 1;
- for (int i = 10; i > 0; i -= 1)
- {
- int x = 1;
- j = 0;
- while (j<k)
- {
- cout << "*";
- a = 0;
- if (x == y)
- {
- while (a < b)
- {
- cout << " ";
- a++;
- }
- b -= 2;
- }
- j++;
- x++;
- }
- k += 2;
- y++;
- cout << endl;
- }
- ;
- cin.get();
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment