We are currently working on new rules for what content should and shouldn't be allowed on this website, and are looking for feedback! See Esolang:2026 topicality proposal to view and give feedback on the current draft.
H+Q9
Jump to navigation
Jump to search
H+Q9 is a derivative of HQ9+ invented by User:None1. The characters are the same while the meanings of the characters are different.
H: Halt.
Q: Quit.
9: Output next character 9 times and halt.
+: Output next character once and halt.
Examples
Quine
999999999
XKCD Random Number
+4
NOP
Q
or
H
or simply
Screamer (only for 9 times)
9A
prints
AAAAAAAAA
Cheating Hello, world!
+問+天+地+好+在H
Screamer(more times)
9A 9A 9A 9A 9A 9A 9A 9A 9A 9A 9A 9A 9A 9A 9A 9A 9A 9A 9A 9A 9A 9A 9A 9A 9A 9A 9A 9A 9A 9A 9A 9A 9A 9A 9A 9A 9A 9A 9A 9A 9A 9A 9A 9A 9A 9A 9A 9A
Notice
After creating this esolang, the author noticed that it isn't that useless after all. The esolang supports printing any character once or 9 times, allowing more powerful programs than HQ9+.
Interpreter
C
#include<stdio.h>
int main(){
char c=getchar();
if(c=='9'){
c=getchar();
printf("%c%c%c%c%c%c%c%c%c",c,c,c,c,c,c,c,c,c);
}else if(c=='+') putchar(getchar());
return 0;
}