포인터 계산기
#include #include #include #include #define SIZE_4K 4096 int main(int argc, char *argv[]) { int trim; double num1, num2, result; char str[SIZE_4K] = {0,}; char oper; char *data, *data_tmp; printf("계산할 값을 입력해주세요.(예: 1+3, 2*5 ... 종료: exit)\n"); do { trim = 0; num1 = 0; num2 = 0; result = 0; oper = '\0'; data = NULL; data_tmp = NULL; printf("수식: "); fgets(str, sizeof(str), stdin); data_tmp = (char*..
2018.04.11