登录
首页 » C » 计算器

计算器

于 2022-07-08 发布 文件大小:55.11 kB
0 93
下载积分: 2 下载次数: 1

代码说明:

用C语言写的关于计算器的实现方式,用栈方法能够实现基本的错误判断与加减乘粗#include #include #include using namespace std; #define MAX 1000 struct zhan1 { float n[MAX]; int top; }stack1; struct zhan2 { char n[MAX]; int top; }stack2; /* stack1用来存储数字 stack2用来存储运算符号. */bool stackempty(zhan1 s)//判断是否为空 { if (s.top== -1) return 1; else return 0; } bool stackempty2(zhan2 s)//判断是否为空 { if (s.top== -1) return 1; else return 0; } void push(zhan1 &s,float x)// 入栈 { if(s.top==MAX-1) { printf(" ");

下载说明:请别用迅雷下载,失败请重下,重下不扣分!

发表评论

0 个回复

  • hongwai-yaokong-jiema
    红外遥控解码,基于51单片机的例程,简单实用,我在学习单片机的时候用到的(Infrared remote control decoding, based on 51 MCU routine, simple and practical, I used the time to learn microcontroller)
    2013-08-04 16:53:01下载
    积分:1
  • 陀螺仪标定因数的测定
    实现陀螺仪输出数据的采集并与电脑端输入的数据共同处理,实现标定因数的测定(Acquisition of gyroscope output data and processing with computer input data are realized to realize the determination of calibration factor.)
    2019-01-01 07:44:50下载
    积分:1
  • cifafenxi
    通过设计、编制、调试一个具体的词法分析程序,加深对词法分析原理的理解,并掌握在对程序设计语言源程序进行扫描过程中将其分解为各类单词的词法分析方法。 实验内容及基本要求: 设计一个简单的程序设计语言(语言中有+、-运算,语句有赋值语句、输入语句、输出语句、复合语句) 要求: 1.输入源程序,最后以“#”作结束标志; 2.处理各单词,计算各个单词的值和类型; 3.输出各个单词名、单词的值和类型。 (By design, develop and debug a specific lexical analysis procedures, to deepen understanding of the principles of lexical analysis, and mastery of the programming language source code will be scanned in the decomposition process of lexical analysis of various types of words. Experimental content and basic requirements: the design of a simple programming language (language has+,- arithmetic, assignment statement has input statements, output statements, compound statements) requirements: 1 input source, and finally to " #" as. end marker 2 each word processing, calculating the value and type of each word 3 outputs each word name, value and type of the word.)
    2021-04-28 08:28:43下载
    积分:1
  • 2DAiry-beamcontrol
    程序实现二维Airy beam的轨迹控制,通过改变wm和wg的值,可控制Airy beam的最大光强在传输轨迹中的任意位置,可观察光束光强的三维分布(Airy beam program implements the two-dimensional locus control by changing the values of wm and wg, controlled Airy beam of the maximum light intensity transmitted anywhere in the track, the light beam can be observed three-dimensional distribution of light intensity)
    2021-03-25 20:19:13下载
    积分:1
  • enables-svpwm-wave-on-the-DSP28335
    二极管箱位型三相三电平PWM整流器主电路拓扑 上用DSP28335实现svpwm波(With DSP28335 achieve svpwm wave diode box-type three-phase three-level PWM rectifier main circuit topology)
    2016-07-24 16:07:03下载
    积分:1
  • VC串口通讯
    用C语言做一个串口通信的程序,使用串口1与串口2通讯,可以相互传输英文字符,波特率可以修改(Using C language to make a serial communication program, using serial port 1 to communicate with serial port 2, English characters can be transmitted to each other, and baud rate can be modified.)
    2020-06-16 23:00:01下载
    积分:1
  • C#写的图象函数程序画图程序,可以画各种函数曲线。供初学者参考...
    C#写的图象函数程序画图程序,可以画各种函数曲线。供初学者参考-C# Write image function procedure Paint program, you can draw a variety of function curves. Reference for beginners
    2023-05-01 10:20:03下载
    积分:1
  • STM8MC-KIT-v1.0
    一个完整的基于ST单片机的恒压频比变频控制程序,很有参考价值,附带的文档有详细的软件结构说明(A complete ST-based single-chip constant voltage frequency VF control program with a detailed description.)
    2017-03-30 09:10:02下载
    积分:1
  • ARX示例代码
    ARX的参考代码,内含多个实例,含有工程和文件,直接上手就可以调试,简单好用。方便学习参考。给工程开发提供便利。
    2022-02-21 06:18:58下载
    积分:1
  • FileHide
    文件隐藏,在驱动级操作,实现文件的隐藏。需要ddk支持(Documents hidden in the drive-level operations, realization of the hidden files. Need ddk Support)
    2010-01-29 16:09:03下载
    积分:1
  • 696518资源总数
  • 106242会员总数
  • 10今日下载