除:("<<x1<<","<<y1<<")/("<<x2<<","<<y2<<")="<<"("<<static_cast<double>(x1*x2+y1*y2)/(x2*x2+y2*y2)<<","<<static_cast<double>(y1*x2-x1*y2)/(x2*x2+y2*y2)<<")"<<endl<<endl;}
void set()
{ cout<<"第一个复数:" ;
cin>>x1>>y1;
cout<<"第二个复数:";
cin>>x2>>y2;
}
};
int main()
{
Complex a;
Complex c(4,3,2,1);
cout<<"以(a, b)的形式打印复数,其中a为实部,b为虚部,其中系统默认的复数为(1,1)"<<endl<<endl;
cout<<"1.未初始化值"<<endl;
a.jia();
a.jian();
a.chen();
a.chu();
cout<<"2.初始化值"<<endl;
c.jia();
c.jian();
c.chen();
c.chu();
cout<<"3.自定义"<<endl;
a.set();
a.jia();
a.jian();
a.chen();
a.chu();
return 0;
}