皮皮学,免费搜题
登录
logo - 刷刷题
搜题
【简答题】
project+3.doc Project 3: Implementation and Applications of Stacks 工程 3: 堆栈的实现和应用 Problems 1. Write a Conversion function to converse any decimal data to binary version. 写一个 Conversion 函数来实现将十进制数转换成二进制数。 Demands: 实验要求: (1) Implement Stack ADT using linked list representation, which must at least has five basic operations: Create , IsFull , Push , IsEmpty and Pop . (1) 使用链表实现堆栈的五个基本函数: Create , IsFull , Push , IsEmpty and Pop . (2) Implement the Conversion function using the previous five stack operations. (2) 用堆栈的这 5 个函数来实现 Conversion , (3) Complete the whole project, in which the input and output should be according to the following format: (3) 完成整个工程,其输入和输出必须按照以下格式: Please input the decimal number: 10 The corresponding binary version is: 1010 Please input the decimal number: 11 The corresponding binary version is: 1011 Please input the decimal number: -1 Bye! 注:完成该程序的同学请登陆数据结构 ACM 在线测试网站: http://ds.imedialab.info/ ,用自己的和姓名注册,然后完成 http://ds.imedialab.info/problem.php?id=1004 。 2. Write a program to judge whether a bracket sequence (maybe has other letters) is “matching”. The “matching” means that if there has a ‘(‘ in a expression and there must has a ‘)’ in it .If the input sequence is “matching”, then output ‘ok’, otherwise output ‘ERROR’. 2. 写一个判断表达式括号是否“匹配”。“匹配”是指如果有一个 ’(’ 则必须在后面有一个 ’)’ 。如果匹配,则输出 ’ok’ ,否则输出 ’ERROR’ 。 Demands (1) Implement Stack using array representation. 用数组实现堆栈。 (2) Build a new project to implement the bracket Matching function. 实现 Matching 函数。 (3) The input and output should be according to the following format: 完成整个程序,输入输出必须按照以下格式: Please input the expression: a*(b+c) The bracket of the expression is matching OK ! Please input the expression: a*(b+c)) The bracket of the expression is matching ERROR ! Please input the expression: (a*(b+c) The bracket of the expression is matching ERROR ! Note 注意 The two implementation of Stack should be written in separated files (.cpp and .h) in the VC++ workspace. Their files should be named differently. 堆栈的两种实现必须分别在不同的源文件和头文件中完成,他们的文件名应有区分。
手机使用
分享
复制链接
新浪微博
分享QQ
微信扫一扫
微信内点击右上角“…”即可分享
反馈
参考答案:
举一反三
【判断题】设有向量【图片】,则对任意一个三维向量【图片】,必定存在一组常数【图片】,使得【图片】=【图片】.
A.
正确
B.
错误
【单选题】绝热系统一定不是( )
A.
开口系统
B.
闭口系统
C.
孤立系统
D.
与外界有热交换
【单选题】如下的1-5题均以本题为基本条件。已知正常男性血液中每毫升白细胞数【图片】,(1)估计每毫升血液中白细胞数在5200~9400之间的概率;(2)如果随机抽取30个男性样本【图片】,如果【图片】,试确定常数【图片】,使得 【图片】经计算,第一问中,事件“每毫升血液中白细胞数在5200~9400之间”的概率等于( )。(保留三位有效数字)
A.
0.990
B.
0.854
C.
0.950
D.
0.997
【单选题】书写公文的成文日期应使用()。
A.
汉字大写
B.
汉字
C.
汉字与阿拉伯数字
D.
阿拉伯数字
【单选题】绝热系统一定不是( )
A.
开口系统
B.
闭口系统
C.
孤立系统
D.
与外界无换热
【判断题】设函数【图片】在有界闭区域【图片】上连续,且该函数在【图片】上一定存在最大值为【图片】,最小值为【图片】,则对任意的满足不等式【图片】的常数【图片】,一定存在【图片】使得【图片】.
A.
正确
B.
错误
【单选题】公文的成文日期有一定的书写要求,下列公文的成文日期书写正确的是( )。
A.
2012.08.10
B.
二〇一二年八月十日
C.
2012年8月10日
D.
二零一二年八月七日
【单选题】书写公文的成文日期,用
A.
阿拉伯数字
B.
大写汉字
C.
小写汉字
【单选题】收缩喷管是一种使气流速度增大的设备,以一定压力、温度,低于音速的速度流入后在其内膨胀, 温度压力下降,流速增高后流出喷管。由质量守恒,进出口的质量流量是相同的,同时可以认为气流流经喷管时散热可忽略不计。取喷管为系统,是什么系统?
A.
孤立系
B.
开口非绝热系
C.
闭口非绝热系
D.
开口绝热系
【判断题】设有向量【图片】,则对任意一个三维向量【图片】,必定存在一组常数【图片】,使得【图片】.
A.
正确
B.
错误
相关题目:
参考解析:
知识点:
题目纠错 0
发布
创建自己的小题库 - 刷刷题