基础练习
文章平均质量分 73
sdose
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
猜数字游戏的实现
#include #include #include #define LOSETIMES 10using namespace std;typedef struct gamerecorddata{ char username[20]; int times;}recorddata; // 储存用户记录的结构体void Helper();原创 2009-12-19 21:17:00 · 461 阅读 · 0 评论 -
字符栈
#include#define STACK_SIZE 30class char_stack{public: char_stack(); char pop(); char push( char ch ); char gettop(); int empty();private: char data[STACK_SIZE]; int top;};原创 2009-12-19 18:09:00 · 1346 阅读 · 0 评论 -
中缀表达式转为后缀表达式
/*********************************转换过程包括用下面的算法读入中缀表达式的操作数、操作符和括号: 1 初始化一个空堆栈,将结果字符串变量置空。 2 从左到右读入中缀表达式,每次一个字符。 3 如果字符是操作数,将它添加到结果字符串。 4 如果字符是个操作符,弹出(pop)操作符, 直至遇见开括号(opening paren原创 2009-12-19 18:16:00 · 440 阅读 · 0 评论
分享