Guest User

05. Eiffel Tower

a guest
May 3rd, 2018
97
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <iostream>
  2. #include <string>
  3. using namespace std;
  4. int main() {
  5. int n; cin>>n;
  6. int shir=(2*n)+6;
  7. for(int i=1;i<=n;i++)
  8. {
  9.   cout<<string((shir/2)-1,'-')<<"**"<<string((shir/2)-1,'-')<<endl;
  10. }
  11. for(int i=1;i<=n-3;i++)
  12. {
  13.   cout<<string((shir/2)-2,'-')<<"****"<<string((shir/2)-2,'-')<<endl;
  14. }
  15. cout<<string((shir/2)-3,'-')<<"******"<<string((shir/2)-3,'-')<<endl;
  16. for(int i=1;i<=n-4;i++) {
  17. cout<<string((shir/2)-3,'-')<<"**--**"<<string((shir/2)-3,'-')<<endl;
  18. }
  19.  for(int i=1;i<=n-3;i++) {
  20. cout<<string((shir/2)-4,'-')<<"**----**"<<string((shir/2)-4,'-')<<endl;
  21. }
  22. cout<<string((shir/2)-5,'-')<<"**********"<<string((shir/2)-5,'-')<<endl;
  23. for(int i=(shir/2)-6;i>=1;i--){
  24.   for(int j=1;j<=i;j++) {cout<<'-';}
  25.   cout<<"**";
  26.   for(int j=1;j<=shir-(2*(i+2));j++) {cout<<'-';}
  27.    cout<<"**";
  28.    for(int j=1;j<=i;j++) {cout<<'-';}
  29.    cout<<endl;
  30. }
  31. cout<<"***"<<string(shir-6,'-')<<"***"<<endl;
  32.   return false;
  33. }
RAW Paste Data