資源簡介
實現了小數,負數的計算;實現了括號加減乘除優先級;實現了開方,次方。
用了棧這種數據結構,點開直接運行 main.c 這個文件

代碼片段和文件信息
#include?“conslaution.h“
#include?“stackfloat.h“
#include?“stackchar.h“
void?PersonalInform()
{
printf(“Calculation\n“);
????printf(“\n“);
????printf(“Author:20160802022?\n??????:20160802023?\n“);
????printf(“\n“);
printf(“Basic?operation:^??Power\n???????????????:&??Prescription\n???????????????:=??Output?The?Result\n“);?
}?
void?error()
{
????printf(“Divisor?cannot?be?0please?try?again\n“);
????printf(“\n“);
}
void?Judgment(struct?charStack?*s)
{
char?ch;
ch=getchar();
????while(ch!=‘=‘)
????{
???? PushChar(sch);
???? ch=getchar();
}
}
void?main()
{
????PersonalInform();
????while(1){
???? Calculation();
}
}
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件???????5043??2018-06-27?22:42??Calculator4\conslaution.h
?????文件????????668??2018-07-12?21:25??Calculator4\main.c
?????文件?????159499??2018-07-12?21:25??Calculator4\main.exe
?????文件???????1261??2018-06-27?20:14??Calculator4\stackchar.h
?????文件????????980??2018-06-27?13:28??Calculator4\stackfloat.h
?????目錄??????????0??2018-07-12?21:26??Calculator4
-----------?---------??----------?-----??----
???????????????167451????????????????????6
- 上一篇:C語言ATM機
- 下一篇:C++酒店管理系統課設
評論
共有 條評論