Created
August 27, 2011 14:20
-
-
Save tomykaira/1175443 to your computer and use it in GitHub Desktop.
This file contains 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
package helloworld; | |
public class Hello { | |
public static void main(String[] args) { | |
int [][] words = { | |
{17, 17, 31, 17, 17}, // H | |
{15, 1, 7, 1, 15}, // E | |
{1, 1, 1, 1, 15}, // L | |
{1, 1, 1, 1, 15}, // L | |
{14, 17, 17, 17, 14}, // O | |
{0, 0, 0, 0, 0}, // [ ] | |
{21, 21, 21, 10, 10}, // W | |
{14, 17, 17, 17, 14}, // O | |
{7, 9, 7, 5, 9}, // R | |
{1, 1, 1, 1, 15}, // L | |
{7, 9, 9, 9, 7}, // D | |
}; | |
for (int [] letter : words) { | |
for (int line : letter) { | |
while (line > 0) { | |
if (line % 2 == 1) { | |
System.out.print("X"); | |
} else { | |
System.out.print(" "); | |
} | |
line = line / 2; | |
} | |
System.out.println(""); | |
} | |
System.out.println("\n"); | |
} | |
} | |
} |
This file contains 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
X X | |
X X | |
XXXXX | |
X X | |
X X | |
XXXX | |
X | |
XXX | |
X | |
XXXX | |
X | |
X | |
X | |
X | |
XXXX | |
X | |
X | |
X | |
X | |
XXXX | |
XXX | |
X X | |
X X | |
X X | |
XXX | |
X X X | |
X X X | |
X X X | |
X X | |
X X | |
XXX | |
X X | |
X X | |
X X | |
XXX | |
XXX | |
X X | |
XXX | |
X X | |
X X | |
X | |
X | |
X | |
X | |
XXXX | |
XXX | |
X X | |
X X | |
X X | |
XXX |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment