Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <bits/stdc++.h>
- #define pb(x) push_back((x))
- #define MS(x,y) memset((x), (y), sizeof(x))
- #define ll long long
- using namespace std;
- int main()
- {
- #if LOCAL_DEBUG
- fstream cin("in.txt");
- #endif
- ios_base::sync_with_stdio(false);
- cin.tie(0);
- cout.tie(0);
- int dolz;
- cin>>dolz;
- int ctr = 0;
- for (int i = dolz/6; i>=1; i--) {
- for (int j = 0; j<i; j++) cout<<" ";
- for (int j = 0; j<dolz/6+ctr*2; j++) cout<<"*";
- for (int j = 0; j<i*2; j++) cout<<" ";
- for (int j = 0; j<dolz/6+ctr*2; j++) cout<<"*";
- cout<<endl;
- ctr++;
- }
- ctr = 0;
- for (int i = dolz-(dolz%6); i>=1; i-=2) {
- for (int j = 0; j<ctr; j++) cout<<" ";
- for (int j = 0; j<i; j++) cout<<"*";
- for (int j = 0; j<ctr; j++) cout<<" ";
- cout<<endl;
- ctr++;
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement