复数的四则运算.包括加,减,乘,除,求模运算。希望这个代码对大家有所帮助。
About Complex Arithmetic Summary
(add sub mul div mod and so on) is very simply but very practiclarly.
I hope this can help every friend
(2010-01-08, Java, 1KB, 下载67次)
设计一个复数类,能够完成复数之间的基本运算,重写方法toString(),使其能输出此复数(形式为: 实部 + 虚部i)。
要求设计的复数类必须有三个构造函数,分别为无参数、1个参数和2个参数的构造函数,完成的基本运算包括两个复数的加、减、乘、除法和变换了共轭复数。
The design of a complex type, able to complete the basic operations between plural, rewrite the method toString (), so that it can output the plural (in the form as follows: real part+ imaginary part i). Designed to be the plural there are three types of structural function, respectively, without parameters, a parameter and two constructor parameters, including the completion of the basic operations of the two complex add, subtract, multiply, divide and transform the complex conjugate. (2009-05-09, Java, 1KB, 下载11次)