This repository has been archived on 2026-03-18. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
pants/c/switch.c
2026-03-18 00:46:30 -07:00

30 lines
352 B
C

#include <stdio.h>
enum options {
STOP = 'q',
CONTINUE = 'c',
NEW = 'n',
};
int main() {
char optbuff[4];
while (optbuff[0] != STOP) {
printf("choose sumth");
scanf("%4s", optbuff);
switch (optbuff[0]) {
case STOP:
printf("stop\n");
break;
case CONTINUE:
printf("continue\n");
break;
break;
}
return 0;
}
}