-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
42 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
#include <stdio.h> | ||
|
||
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; | ||
} |