返回列表 發帖
#include<iostream>
#include<cstdlib>
using namespace std;

int main()
{
    int x,y;
    cout<<"請輸入x:"<<endl;
    cin>>x;
    cout<<"請輸入y:"<<endl;
    cin>>y;
    cout<<"x等於"<<x<<";y等於"<<y<<endl;
    cout<<"x+y="<<x+y<<endl;
    cout<<"x-y="<<x-y<<endl;
    cout<<"x*y="<<x*y<<endl;
    cout<<"x/y="<<x/y<<endl;
    cout<<"x%y="<<x%y<<endl;
    system("pause");   
    return 0;
}

TOP

返回列表