每次输⼊两个复数,每个复数均包括由空格分隔的两个浮点数,输⼊第⼀个复数后,键⼊回⻋,然后继续输⼊第⼆个复数。5 \3 B* \7 S6 i! n3 W5 L/ w
输出两个复数,每个复数占⼀⾏;复数是由⼩括号包围的形如 (a+bi) 的格式。注意不能输出全⻆括号。0 e% c" K, e8 a0 i9 K
样例输⼊! I9 b* }2 A' M) E# m& m4 j
1 , `0 H; ~4 g2 I6 @" l2; e/ [# H, M2 \% c
-1.1 2.0 ! y' B2 c! x4 p' N! Q 0 -4.5 " ~3 y; ]7 J5 f, p样例输出3 c$ Z$ w. J( |8 A
1: ?2 l4 Y$ v" }
27 Y$ _8 s# b; ?2 U" o, ]4 P# f
3- q! G% f& s( V, |9 G% B$ ]1 W
46 B$ \) ?1 S0 m; V* y9 G
50 L9 [) G, n5 w8 k. K$ t! a
(-1.1+2i) (0-4.5i) * G, t, T& s" O% b' D0 t(-1.1-2.5i)0 l7 t: c1 [8 k) l: q! y
(-1.1+6.5i) ; x+ b6 |( F& M" o4 U8 Y(9+4.95i) % I& ]/ x6 g( ~2 K2 D% ]: b j+ d(-0.444444-0.244444i)1 Y, f( i4 ?8 X; ]% f
提示* t$ _( \! `: l
需要注意,复数的四则运算定义如下所示:! g7 ~" J$ d- ^# V( ?* c
加法法则: ( a + b i ) + ( c + d i ) = ( a + c ) + ( b + d ) i (a + bi) + (c + di) = (a + c) + (b + d)i (a+bi)+(c+di)=(a+c)+(b+d)i
减法法则: ( a + b i ) − ( c + d i ) = ( a − c ) + ( b − d ) i (a + bi) − (c + di) = (a − c) + (b − d)i (a+bi)−(c+di)=(a−c)+(b−d)i
乘法法则: ( a + b i ) × ( c + d i ) = ( a c − b d ) + ( b c + a d ) i (a + bi) × (c + di) = (ac − bd) + (bc + ad)i (a+bi)×(c+di)=(ac−bd)+(bc+ad)i
除法法则: ( a + b i ) ÷ ( c + d i ) = [ ( a c + b d ) / ( c 2 + d 2 ) ] + [ ( b c − a d ) / ( c 2 + d 2 ) ] i (a + bi) ÷ (c + di) = [(ac + bd)/(c^2 + d^2 )] + [(bc − ad)/(c^2 + d^2)]i (a+bi)÷(c+di)=[(ac+bd)/(c2+d2)]+[(bc−ad)/(c2+d2)]i : ~8 G( p% L6 V. k( g7 w' Z+ A