⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 main.cpp

📁 栈的应用—Polish Calculator
💻 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 + -