题目18:用C语言设计一个简单的计算器,要求能够对输入的数 1.进行+,-,*,/,运算; 2.可以带括号( );
题目18:用C语言设计一个简单的计算器,要求能够对输入的数 1.进行+,-,*,/,运算; 2.可以带括号( );
日期:2010-12-15 14:18:11 人气:1
#include
#include
#include
int deal(int op1,int op2,char op) //运算
{
switch(op)
{
case '+': op1 += op2; break;
case '-': op1 -= op2; break;
case '*': op1 *= op2; break;
case '/': op1 /= op