C++编程:输入两个整数,输出它们的和、差、积、商。

2024-11-22 13:37:52
推荐回答(3个)
回答(1):

#include
using namespace std;
void main()
{
int m,n;
cout<<"input two number:"< cin>>m>>n;
cout<<"和:"< cout<<"差:"< cout<<"积:"< cout<<"商:"<<(float)m/n<}

回答(2):

int main()
{
    int a,b;
    cout<<"请输入a和b的值\n";
    cin>>a'
    cin>>b;
    cout<<"\na + b = "<        <<"\na * b = "<    return 0;
}

回答(3):

int main()
{
int a,b;
cout<<"请输入a和b的值\n";
cin>>a'
cin>>b;
cout<<"\na + b = "< return 0;
}