File tree Expand file tree Collapse file tree 1 file changed +33
-0
lines changed
Expand file tree Collapse file tree 1 file changed +33
-0
lines changed Original file line number Diff line number Diff line change 1+ HAI 1.2
2+
3+ BTW Function to output a string n times
4+ HOW IZ I OUTPUT_N_TIMES_FOR YR string AN YR n
5+ IM IN YR loop UPPIN YR i TIL BOTH SAEM i AN BIGGR OF i AN n
6+ VISIBLE ":{string}" !
7+ IM OUTTA YR loop
8+ IF U SAY SO
9+
10+ BTW For n = 0 to 20
11+ IM IN YR loop UPPIN YR n TIL BOTH SAEM n AN BIGGR OF n AN 21
12+ BTW num_spaces = abs(n - 10)
13+ I HAS A num_spaces ITZ DIFF OF n AN 10
14+ DIFFRINT num_spaces AN BIGGR OF 0 AN num_spaces
15+ O RLY?
16+ YA RLY
17+ num_spaces R PRODUKT OF - 1 AN num_spaces
18+ OIC
19+
20+ BTW num_stars = 21 - 2 * num_spaces
21+ I HAS A num_stars ITZ DIFF OF 21 AN PRODUKT OF 2 AN num_spaces
22+
23+ BTW Output " " num_spaces times
24+ I IZ OUTPUT_N_TIMES_FOR YR " " AN YR num_spaces MKAY
25+
26+ BTW Output "*" num_stars times
27+ I IZ OUTPUT_N_TIMES_FOR YR "*" AN YR num_stars MKAY
28+
29+ BTW Output newline
30+ VISIBLE ""
31+ IM OUTTA YR loop
32+
33+ KTHXBYE
You can’t perform that action at this time.
0 commit comments