# [Ruby](https://www.ruby-lang.org/en/), <strike>80</strike> 76 bytes -4 bytes thanks to manatwork puts"\\";$*[i=0].chars.each_cons 2{|b,c|puts" "*(b==c ?b==?/?i-=1:i+=1:i)+c} [Try it online!](https://tio.run/##KypNqvz/v6C0pFgpJkbJWkUrOtPWIFYvOSOxqFgvNTE5Iz45P69Ywai6JkknuQasTkFJSyPJ1jZZwR5I2uvbZ@raGlplaoMITe3k2v///8fExOjrx@jHxAAA "Ruby – Try It Online") Explanation: puts "\\" # Output the first backslash $*[i=0]. # Get the first argument and set i to 0 chars. # Go through every individual character, each_cons 2 { |b,c| # In pairs to compare easily # puts " " * # Decide how many padding spaces to use based on the value # of i. The expression inside the parenthesis will return # i but before that, it will increment/decrement i based # on what the previous character was. # ( b==c ? # if b == c b==?/ ? # if b == "/" (Going to the left) i-=1 # return decremented i : # else (Going to the right) i+=1 # return incremented i : # else i) + # return i # c # Finally, write the second of the characters that we're } # iterating through.