📄 main.cpp
字号:
#include<iostream.h>
#include"PolishCal.h"
void main()
/*
Post: The program has executed simple arithmetic
commands entered by the user.
Uses: The class Stack and the functions
introduction, instructions, do_command, and get_command.
*/
{
MyStack stored_numbers;
void introduction();
void instructions();
introduction();
instructions();
while (do_command(get_command(), stored_numbers));
}
void introduction()
{
cout<<"This is a reverse Polish Calculator."<<endl;
}
void instructions()
{
cout << "Please enter a valid command:" << endl
<< "[?]push to stack [=]print top" << endl
<< "[+] [-] [*] [/] are arithmetic operations" << endl
<< "[Q]uit." << endl;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -