【作业】求高手帮忙解答一下,明天要用!第一题

2024-11-22 05:18:30
推荐回答(1个)
回答1:

交谈中请勿轻信汇款、中奖信息,勿轻易拨打陌生电话。

易水若寒 2009-12-4 9:32:08
#include"iostream.h"
class complex
{
private:
double Real,Image;
public:
complex(double,double
void Display(char []);

};
complex::complex(double x,double y)
{
Real=x;Image=y;
}
void complex::Display(char k[])
{
cout<}
void main()
{
complex c1(20,40);
c1.Display("c1");
complex c2(0,0);
c2.Display("c2");
cout<}