Trag die Liedtexte zu dem beliebten, sich wiederholenden Kinderlied Ten Green Bottles vor.
Beachte, dass nicht alle Strophen identisch sind.
Ten green bottles hanging on the wall,
Ten green bottles hanging on the wall,
And if one green bottle should accidentally fall,
There'll be nine green bottles hanging on the wall.
Nine green bottles hanging on the wall,
Nine green bottles hanging on the wall,
And if one green bottle should accidentally fall,
There'll be eight green bottles hanging on the wall.
Eight green bottles hanging on the wall,
Eight green bottles hanging on the wall,
And if one green bottle should accidentally fall,
There'll be seven green bottles hanging on the wall.
Seven green bottles hanging on the wall,
Seven green bottles hanging on the wall,
And if one green bottle should accidentally fall,
There'll be six green bottles hanging on the wall.
Six green bottles hanging on the wall,
Six green bottles hanging on the wall,
And if one green bottle should accidentally fall,
There'll be five green bottles hanging on the wall.
Five green bottles hanging on the wall,
Five green bottles hanging on the wall,
And if one green bottle should accidentally fall,
There'll be four green bottles hanging on the wall.
Four green bottles hanging on the wall,
Four green bottles hanging on the wall,
And if one green bottle should accidentally fall,
There'll be three green bottles hanging on the wall.
Three green bottles hanging on the wall,
Three green bottles hanging on the wall,
And if one green bottle should accidentally fall,
There'll be two green bottles hanging on the wall.
Two green bottles hanging on the wall,
Two green bottles hanging on the wall,
And if one green bottle should accidentally fall,
There'll be one green bottle hanging on the wall.
One green bottle hanging on the wall,
One green bottle hanging on the wall,
And if one green bottle should accidentally fall,
There'll be no green bottles hanging on the wall.
Gib den Liedtext als nullterminierten String aus.
| Register | Verwendung | Typ | Beschreibung |
|---|---|---|---|
$a0 |
Eingabe | Ganzzahl | Anzahl der Flaschen zu Beginn |
$a1 |
Eingabe | Ganzzahl | Anzahl der Flaschen, die wegfallen |
$a2 |
Ein-/Ausgabe | Adresse | nullterminierter Ausgabe-String |
$t0-9 |
temporär | beliebig | zur temporären Speicherung |
Melde dich bei Exercism an, um MIPS Assembly mit 70 Übungen und echtem menschlichen Mentoring zu lernen und zu meistern, alles kostenlos.