Execute HQ9+/Java: Difference between revisions

m
Spaces so "break" is highlighted
m (Lowercase-ing input)
m (Spaces so "break" is highlighted)
Line 20:
for(char instr:code.toCharArray()){
switch(instr){
case 'q': System.out.println(code); break;
case 'h': System.out.println("Hello, World!"); break;
case '9': printBottles(); break;
case '+': acc++; break;
default: //ignore other chars
}
Anonymous user