c programming (2) 썸네일형 리스트형 C언어 십진법 이진법 변환기 [with source] 안녕하세요 오늘은 십진법 to 이진법 계산기를 만들어 보았습니다. 소스코드 보겠습니다. 소스코드 source.cpp #include #include #include #define PLUS'+' #define MINUS'-' #define BIT64 int main(void) { long long num; bool bin[BIT] = { 0, }; char sign; int i; int UsedMaxBit; bool CDel = true; while (true) { num = 0; memset(bin, 0, sizeof(bin)); CDel = true; UsedMaxBit = 0; printf("num : "); scanf("%lld", &num); if (num == 0) { printf("binary.. C언어 이진법 to 십진법 변환기 [with source] *이 글은 작성자의 기존 네어버 블로그에서 발췌되었습니다. 안녕하세요 오늘은 이진법 to 십진법 계산기를 만들어 보았습니다. 소스코드 보겠습니다. 소스코드 source.cpp #include #include #define BIT64 //부호를 제외하고 최대로 인식이 가능한 길이 //즉 입력된 이진법의 길이가 64초과이면 64글자 이상은 인식이 불가능하다 int main(void) { char * Bin = (char *)malloc(sizeof(char) * BIT); int plus, i; long long num; int Used_Max_Bit; printf("include sign : "); scanf("%d", &plus); Bin[0] = getchar(); //버퍼 날리기 if (plus) {.. 이전 1 다음