forked from M-Labs/nac3
1
0
Fork 0
nac3/nac3standalone/demo/demo.c

31 lines
463 B
C
Raw Normal View History

2020-03-30 22:47:45 +08:00
#include <stdio.h>
#include <string.h>
2021-09-22 14:30:52 +08:00
void output_int(int x) {
printf("%d\n", x);
}
2021-12-13 04:06:38 +08:00
void output_long(long x) {
printf("%ld\n", x);
}
2021-09-22 14:30:52 +08:00
void output_asciiart(int x) {
2020-03-30 22:47:45 +08:00
static char chars[] = " .,-:;i+hHM$*#@ ";
if(x < 0) {
putchar('\n');
} else {
if(x < strlen(chars)) {
2021-09-22 14:30:52 +08:00
putchar(chars[x]);
2020-03-30 22:47:45 +08:00
} else {
2021-09-22 14:30:52 +08:00
printf("ERROR\n");
2020-03-30 22:47:45 +08:00
}
}
}
extern int run();
int main() {
run();
return 0;
}