Communities

Writing
Writing
Codidact Meta
Codidact Meta
The Great Outdoors
The Great Outdoors
Photography & Video
Photography & Video
Scientific Speculation
Scientific Speculation
Cooking
Cooking
Electrical Engineering
Electrical Engineering
Judaism
Judaism
Languages & Linguistics
Languages & Linguistics
Software Development
Software Development
Mathematics
Mathematics
Christianity
Christianity
Code Golf
Code Golf
Music
Music
Physics
Physics
Linux Systems
Linux Systems
Power Users
Power Users
Tabletop RPGs
Tabletop RPGs
Community Proposals
Community Proposals
tag:snake search within a tag
answers:0 unanswered questions
user:xxxx search by author id
score:0.5 posts with 0.5+ score
"snake oil" exact phrase
votes:4 posts with 4+ votes
created:<1w created < 1 week ago
post_type:xxxx type of post
Search help
Notifications
Mark all as read See all your notifications »
Challenges

Post History

75%
+4 −0
Challenges Tile pyramids on top of each other!

The task Given a positive integer as input, output tiled pyramids of this height. How? Let's say the inputted integer was n. From there, we output n lines of output, each having: A decreasing...

9 answers  ·  posted 4y ago by Dion‭  ·  last activity 3y ago by A username‭

Question code-golf ascii-art
#1: Initial revision by user avatar Dion‭ · 2020-11-18T11:54:05Z (almost 4 years ago)
Tile pyramids on top of each other!
The task
=
Given a positive integer as input, output tiled pyramids of this height.

How?
=
Let's say the inputted integer was `n`. From there, we output `n` lines of output, each having:

 1. A decreasing indentation of spaces starting with `n-1` spaces and ending with `0` spaces
 2. An increasing number of the symbol `/` starting with `1` symbol and ending with `n` symbols
 3. An increasing number of the symbol `\` starting with `1` symbol and ending with `n` symbols

For example, with an input of 4, the output should be the following:

```
   /\
  //\\
 ///\\\
////\\\\
```

Rules
=
 1. You may output an optional newline after the required output
 2. Input will always be a positive integer
 3. This is code-golf, so lowest byte-count *for each language* is the winner

Test cases
=
```
Input: 1
Output:
/\


Input: 7
Output:
      /\
     //\\
    ///\\\
   ////\\\\
  /////\\\\\
 //////\\\\\\
///////\\\\\\\


Input: 11
Output:
          /\
         //\\
        ///\\\
       ////\\\\
      /////\\\\\
     //////\\\\\\
    ///////\\\\\\\
   ////////\\\\\\\\
  /////////\\\\\\\\\
 //////////\\\\\\\\\\
///////////\\\\\\\\\\\
```