摘要: 方法一: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", & 阅读全文
posted @ 2013-01-30 10:15 maxspeed 阅读(336) 评论(0) 推荐(0) 编辑