【数据结构_链表_List_0961】进制转换
来源:互联网 发布:哈密顿算法原理 编辑:程序博客网 时间:2024/05/22 12:21
容我说一句链表貌似把这么简单的东西复杂化了很多;
#include<stdio.h>#include<stdlib.h>typedef struct { int data[50]; int top;}SqStack;void initstack(SqStack *&s){ s=(SqStack *)malloc(sizeof(SqStack)); s->top=-1;}int main(){ int n; scanf("%d",&n); SqStack *s; initstack(s); while(n>0) { s->top++; s->data[s->top]=n%2; n=n/2; } while(s->top>=0) { printf("%d",s->data[s->top]); s->top--; } return 0;}
0 0
- 【数据结构_链表_List_0961】进制转换
- 1012_进制转换
- 数据结构_栈实现数值转换
- 数据结构之进制转换
- 数据结构进制转换源代码
- 1474 数据结构:进制转换
- 数据结构-栈--进制转换
- java_数据结构_链表
- 数据结构_链表
- 函数_内存结构_数组_排序_选择排序_冒泡排序_折半查找_插入排序_进制转换数组
- C#使用_进制转换
- hdu_2031_进制转换_解题报告
- c++_栈实现进制转换
- ACM_模板_进制转换
- 整数类型_进制转换
- 递归应用_进制转换_2_8_16
- 数据结构_链表_单向链表
- 数据结构 栈的应用 进制转换
- Bluetooth Low Energy(蓝牙低功耗)
- 【Tomcat、Java Web】This kind of launch is associated with the Debug perspective
- Windows网络编程基础
- Linux下UART串口的测试小程序
- 自动升级的原理及实现
- 【数据结构_链表_List_0961】进制转换
- 解读 FindServicingStackDirectoryVersion
- redis、memcache、mongoDB 对比
- 变量类型
- 201403-2-窗口
- JAVA实现归并排序
- 第一篇博客,Android四大组件
- java中大小写字母转换
- IOCP模型与网络编程