#include<iostream.h>
int jiafa(int a, int b)
{
return a + b;
}
int jianfa(int a, int b)
{
return a - b;
}
int chengfa(int a,int b)
{
return a * b;
}
int chufa(int a,int b)
{
return a /b;
}
int main()
{
int a1, b1;
cout<<"请输入第一个数字"<<endl;
cin>>a1;
cout<<"请输入第二个数字"<<endl;
cin>>b1;
int jieguo = jiafa(a1, b1);
cout<<"加法计算结果为"<<jieguo<<endl;
int jieguo1 = jianfa(a1, b1);
cout<<"减法计算结果为"<<jieguo1<<endl;
int jieguo2 = chengfa(a1,b1);
cout<<"乘法计算结果为"<<jieguo2<<endl;
int jieguo3 = chufa(a1,b1);
cout<<"除法计算结果为"<<jieguo3<<endl;
return 0;
}
简易计算器
最新推荐文章于 2023-09-18 09:54:05 发布