1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | #define _CRT_SECURE_NO_WARNINGS #include <stdio.h> int main(void) { char op; int x, y; printf("¼ö½ÄÀ» ÀÔ·ÂÇϽÿÀ: "); scanf("%d %c %d", &x, &op, &y); if (op == '+') printf("%d \n", x + y); else if (op == '-') printf("%d \n", x - y); else if (op == '*') printf("%d \n", x * y); else if (op == '/') printf("%d \n", x / y); else printf("Áö¿øµÇÁö ¾Ê´Â ¿¬»êÀÚÀÔ´Ï´Ù. \n"); return 0; } | cs |