练习10

#include
using namespace std;
class complex{
public:
    void set(int number1,int number2,int number3,int number4);
    void show();
private:
    int a,b,c,d;
};
void complex::set(int number1,int number2,int number3,int number4){
    a=number1+number3;
    b=number2+number4;
    c=number1-number3;
    d=number2-number4;
}
inline void complex::show(){
    cout<<"the sum of the two complexe  is "<     cout<<"the subtract of the two complexes is "< }
int main(){
    complex mycm;
    int m,n,s,r;
    cout<<"Please input four number:";
    cin>>m>>n>>s>>r;
    mycm.set(m,n,s,r);
    mycm.show();
    return 0;
}

你可能感兴趣的:(练习10)