diff --git a/calculator.c b/calculator.c new file mode 100644 index 0000000..794b5d9 --- /dev/null +++ b/calculator.c @@ -0,0 +1,42 @@ +#include + +void add() +{ +} +void sub() +{ +} +void mul() +{ +} +void div() +{ +} + +int main(void) +{ + while (1) + { + printf("===== 계산기 프로그램 =====\n"); + printf("[*] 연산 선택: "); + int ipt = getchar(); + int a = getchar(); + int b = getchar(); + switch (ipt) + { + case '+': + printf("[*] 더하기를 진행합니다.\n"); + add(a, b); + case '-': + printf("[*] 빼기를 진행합니다.\n"); + sub(a, b); + case '*': + printf("[*] 곱하기를 진행합니다.\n"); + mul(a, b); + case '/': + printf("[*] 나누기를 진행합니다.\n"); + div(a, b); + } + } + return 0; +} \ No newline at end of file