计算x和y的加减乘除的不同结果形式

img


使结果为
Please input x and y:9 3
x+y=12
x-y=6
9*3=27
9/3=3


#include <iostream>
#include <stdio.h>
using namespace std;

int main() {
    int x,y;
    cout << "please input x and y:" << endl;
    scanf("%d,%d",&x,&y);
    cout << "x+y=" << x+y << endl;
    cout << "x-y=" << x-y << endl;
    cout << "x*y=" << x*y << endl;
    cout << "x/y=" << x/y << endl;
    return 0;
}