Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- christmasTree perm i = do
- if perm - 1 == i
- then return()
- else do
- putStrLn (replicate (i - perm) ' ' ++ replicate perm '*' ++ "|" ++ replicate perm '*' ++ replicate (i - perm) ' ')
- christmasTree (perm + 1) i
- main = do
- n <- getLine
- let i = read n :: Int
- christmasTree 0 i
- repeatString str i =
- if i == 1
- then str
- else str ++ (repeatString str (i - 1))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement