摘要: 最基本的情况,给个10进制数,转化为2进制。。。 1 #include <stdio.h> 2 3 void Swap(char * a, int i, int j) 4 { 5 char temp = a[i]; 6 a[i] = a[j]; 7 a[j] = temp; 8 } 9 10 char * Ten2Two(int n)11 {12 static char data[100];13 int i = 0;14 while (n != 0) {15 data[i++] = n % 2 + '0';16 ... 阅读全文
posted @ 2011-10-27 18:02 吃吃户 阅读(275) 评论(0) 推荐(0) 编辑