expremain.cpp
来自「栈的操作与应用 定界符配对检查 中缀转后缀并求值」· C++ 代码 · 共 56 行
CPP
56 行
#include"function1.h"
#include"function2.h"
#include <math.h>
#include <string.h>
#include <iostream.h>
#include<strstrea.h>
#include<fstream.h>
void main(){
for(;;){
char input;
system("cls");
cout << " =======================栈的操作应用==================\n";
cout << " \n";
cout << " 0:---- 出口"<<endl;
cout << " 1:---- 定界符配对检查"<<endl;
cout << " 2:---- 中缀转后缀并求值"<<endl;
cout << " =====================================================\n";
cout << "请选择0/1/2: ";
cin >> input;
cout << " \n";
switch(input){
case'0':
cout<<"再见"<<endl;
cout << " \n";
exit(-1);
break;
case'1':
char ch2;
do{
Check();
cout<<"是否继续?<y/n>"<<endl;
cin>>ch2;
}while(ch2=='y');
system("pause");
break;
case'2':{
char ch1;
do{
opera2();
cout<<"是否继续?<y/n>"<<endl;
cin>>ch1;
}while(ch1=='y');
system("pause");
break;
default:
system("cls");
} break;
}
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?