- 博客(2)
- 收藏
- 关注
原创 进制转化(10-20)简单方法
/* 假定int为16位 *///利用数值在内存中是以二进制的形式储存的,所以将输入的10进制转化成2进制只是将内存中的值打印出来//利用按位与运算可以算出任何数值的最后一位 num & 1 //可以计算负数 #include stdio.h>int main(void){ int a, i; while (scanf("%d", &a) != EOF) {
2008-05-05 22:32:00 513
原创 进制转化(10->2)
/* 用双向动态链表储存数据,没有数据大小限制 *//* 可以转换负数 */ #include stdio.h>#include malloc.h>int main(void){ struct num2 { int a; struct num2 *next; struct num2 *bellow; }; struct nu
2008-05-05 22:21:00 328
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人