Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int main()
- {
- int x, i, j, z, a, y;
- x = 9;
- for(a = 3; a <=5; a++) {
- for(j = 1; j <= a; j++) {
- y = (x / 2) + 1 - j;
- for(i = 1; i <= y; i++) {
- cout << " ";
- }
- for(z = 1; z <= 2 * j - 1; z++) {
- cout << "*";
- }
- for(i = 1; i <= y; i++) {
- cout << " ";
- }
- cout << endl;
- }
- }
- for(i = 1; i <=4; i++) {
- cout << " ";
- }
- cout << "*";
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement