rendered paste body#include <stdio.h>
#include <stdlib.h>
int ask(char *question) {
int c;
printf("%s (y/n)\n", question);
while ((c = getchar()) == '\n');
if (c < 0)
exit(1);
return c;
}
int main(int argc, char *argv[]) {
switch(ask("Is it working?")) {
case 'y':
printf("Don't mess with it.\n");
return 0;
case 'n':
switch(ask("Did you mess with it?")) {
case 'y':
goto idiot;
}
}
idiot:
switch(ask("YOU IDIOT!\nAnyone else know?")) {
case 'y':
goto screwed;
case 'n':
printf("Hide it.\n");
return 0;
default: goto idiot;
}
screwed:
printf("You're screwed!\n");
while (1) {
switch(ask("Can you blame someone else?")) {
case 'y':
printf("No problem.\n");
return 0;
case 'n':
goto screwed;
}
}
}