File tree Expand file tree Collapse file tree 2 files changed +134
-3
lines changed
Expand file tree Collapse file tree 2 files changed +134
-3
lines changed Original file line number Diff line number Diff line change 1+ package io.github.amirisback
2+
3+ var line1 = mutableListOf<String >()
4+ var line2 = mutableListOf<String >()
5+ var line3 = mutableListOf<String >()
6+ var line4 = mutableListOf<String >()
7+ var line5 = mutableListOf<String >()
8+
9+ fun showText (text : String ) {
10+ val data = text.toCharArray()
11+
12+ data.forEachIndexed { index, c ->
13+ when (c) {
14+ ' A' -> createA()
15+ ' a' -> createA()
16+ ' B' -> createB()
17+ ' b' -> createB()
18+ ' C' -> createC()
19+ ' c' -> createC()
20+ ' D' -> createD()
21+ ' d' -> createD()
22+ ' E' -> createE()
23+ ' e' -> createE()
24+ ' F' -> createF()
25+ ' f' -> createF()
26+ ' G' -> createG()
27+ ' g' -> createG()
28+ ' H' -> createH()
29+ ' h' -> createH()
30+ ' I' -> createI()
31+ ' i' -> createI()
32+ ' J' -> createJ()
33+ ' j' -> createJ()
34+ ' K' -> createK()
35+ ' k' -> createK()
36+
37+ }
38+ }
39+
40+ println (line1)
41+ println (line2)
42+ println (line3)
43+ println (line4)
44+ println (line5)
45+ }
46+
47+ fun createA () {
48+ line1.add(" ### " )
49+ line2.add(" # #" )
50+ line3.add(" #####" )
51+ line4.add(" # #" )
52+ line5.add(" # #" )
53+ }
54+
55+ fun createB () {
56+ line1.add(" #### " )
57+ line2.add(" # ##" )
58+ line3.add(" #####" )
59+ line4.add(" # ##" )
60+ line5.add(" #### " )
61+ }
62+
63+ fun createC () {
64+ line1.add(" #####" )
65+ line2.add(" # " )
66+ line3.add(" # " )
67+ line4.add(" # " )
68+ line5.add(" #####" )
69+ }
70+
71+ fun createD () {
72+ line1.add(" #### " )
73+ line2.add(" # #" )
74+ line3.add(" # #" )
75+ line4.add(" # #" )
76+ line5.add(" #### " )
77+ }
78+
79+ fun createE () {
80+ line1.add(" #####" )
81+ line2.add(" # " )
82+ line3.add(" #####" )
83+ line4.add(" # " )
84+ line5.add(" #####" )
85+ }
86+
87+ fun createF () {
88+ line1.add(" #####" )
89+ line2.add(" # " )
90+ line3.add(" #####" )
91+ line4.add(" # " )
92+ line5.add(" # " )
93+ }
94+
95+ fun createG () {
96+ line1.add(" #####" )
97+ line2.add(" # " )
98+ line3.add(" #####" )
99+ line4.add(" # #" )
100+ line5.add(" #####" )
101+ }
102+
103+ fun createH () {
104+ line1.add(" # #" )
105+ line2.add(" # #" )
106+ line3.add(" #####" )
107+ line4.add(" # #" )
108+ line5.add(" # #" )
109+ }
110+
111+ fun createI () {
112+ line1.add(" #" )
113+ line2.add(" #" )
114+ line3.add(" #" )
115+ line4.add(" #" )
116+ line5.add(" #" )
117+ }
118+
119+ fun createJ () {
120+ line1.add(" ##" )
121+ line2.add(" #" )
122+ line3.add(" #" )
123+ line4.add(" # #" )
124+ line5.add(" #####" )
125+ }
126+
127+ fun createK () {
128+ line1.add(" # #" )
129+ line2.add(" # # " )
130+ line3.add(" ## " )
131+ line4.add(" # # " )
132+ line5.add(" # #" )
133+ }
Original file line number Diff line number Diff line change 11package io.github.amirisback
22
33fun main () {
4- val name = " Kotlin"
5- println (" Hello, $name !" )
6-
4+ showText(" AIIA" )
75}
You can’t perform that action at this time.
0 commit comments