Last active
January 1, 2016 08:39
-
-
Save yutopp/8119577 to your computer and use it in GitHub Desktop.
ア…ア…
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 2013/12/25 | |
def main(): void | |
{ | |
val i = 0: int mutable; | |
while( i < 10 ) { | |
pl( i ); | |
i = i + 1; | |
} | |
print( " #rill || #xmas\n" ); | |
} | |
def pl( val i: int ): void | |
{ | |
pw( i ); | |
print("/"); | |
val j = 0: int mutable; | |
while( j < i*2 ) { | |
pr( ( i / 2 + j ) % 4 ); | |
j = j + 1; | |
} | |
print("\"); | |
pw( i ); | |
print( "\n" ); | |
} | |
def pw( val b: int ): void | |
{ | |
val max = 10: int; | |
val i = 0: int mutable; | |
while( i < max - b ) { | |
print( " " ); | |
i = i + 1; | |
} | |
} | |
def pr( val b: int ): void | |
{ | |
if ( b == 0 ) | |
print( "-" ); | |
else if ( b == 1 ) | |
print( "*" ); | |
else if ( b == 2 ) | |
print( "-" ); | |
else if ( b == 3 ) | |
print( "o" ); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment