链栈
来源:互联网 发布:合金装备5连接网络 编辑:程序博客网 时间:2024/06/05 03:47
#include<iostream>using namespace std;typedef struct node{int data;struct node *next;} *stack;void init(stack &s){s=NULL;}int pop(stack &s){int x;x=s->data;s=s->next;return x;}void push(stack &s,int e){stack p;p=new node;p->data=e;p->next=s;s=p;}int main(){int i,n;stack s;init(s);while(cin>>n){ while(n) { push(s,n%5); n/=5;} while(s) cout<<pop(s); cout<<endl;}return 0;}
- 链栈
- 链栈
- 链栈
- 链栈
- 链栈
- 链栈
- 链栈
- 链栈
- 链栈
- 链栈
- 链栈
- 链栈
- 链栈
- 链栈
- 链栈
- 链栈
- 链栈
- 链栈
- http中的gzip
- UVa 10125 - Sumsets
- 【OI杂记】求二叉树上任意两点的最短路径上的边权最大值
- Fedora 17 下运行Kettle遇到"A fatal error has been detected by the Java Runtime Environment"
- platform_device与platform_driver
- 链栈
- eclipse 使用点滴
- Android Fragments 详细使用
- x-window相关的使用
- Bluetooth(蓝牙)
- 基于TMS320DM365设计简介(一)
- 关于UpdateData(TRUE)和UpdateData(False)使用
- TabNavigator动态加载Scroller
- 脱壳经验总谈.