登录
首页 » ActiveX-DCOM-ATL » 1. 定义一个复数类Complex,该类有代表实部与虚部的成员变量,有两个构造函数Complex()与Complex(int x,int y)分别完成将成员变量...

1. 定义一个复数类Complex,该类有代表实部与虚部的成员变量,有两个构造函数Complex()与Complex(int x,int y)分别完成将成员变量...

于 2022-03-18 发布 文件大小:3.14 kB
0 47
下载积分: 2 下载次数: 1

代码说明:

1. 定义一个复数类Complex,该类有代表实部与虚部的成员变量,有两个构造函数Complex()与Complex(int x,int y)分别完成将成员变量初始化为0及给定值,另有计算复数的加减法及输出复数的三个方法,编程序利用该类完成2+3i与6-8i相加,12+9i与20-8i相减,并利用复数的输出方法将结果输出。-Define a complex number class Complex, the class is represented real and imaginary parts of the member variable, there are two constructor Complex () and the Complex (int x, int y) of the respective member variables will be initialized to 0 and the given value Another calculation of complex addition and subtraction method and output the plural of the three methods, programmed to use the class to complete 2+3 i and 6-8i sum, 12+9 i and subtract 20-8i, and the use of the plural output method results output.

下载说明:请别用迅雷下载,失败请重下,重下不扣分!

发表评论

0 个回复

  • 696518资源总数
  • 104225会员总数
  • 32今日下载