留求艺—您的留学规划师

C语言编写逆波兰计算器

148次

问题描述:

C语言编写逆波兰计算器求高手给解答

最佳答案

推荐答案

#include#include#include #defineSTACK_SIZE 20 intmake_empty(void);boolis_empty(void);boolis_full(void);voidpush(char );voidpop(char );voidstack_overflow(void);voidstack_underflow(void); charcontents[STACK_SIZE]= {0},top; intmain(int argc, char *argv[]){char ch='1';while(ch!='q'){make_empty();printf("Enter an RPNexpression:");do{scanf(" %c",&ch);if(ch>='1'&&ch

C语言编写逆波兰计算器

为你推荐