摘要:
方法一:int main() { int ival, n = 0; char bin[32]; scanf("%d", &ival); while(ival > 0) { bin[n++] = ival % 2; ival /= 2; } for(n--; n >= 0; n--) printf("%d", bin[n]); printf("\n"); getch();}方法二:int main() { int ival, n = 0; char bin[32];scanf("%d", & 阅读全文