Skip to content

Commit 31e0027

Browse files
xljxlj
authored andcommitted
empty
1 parent 8351794 commit 31e0027

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

109-Complex-Numbers/complex-3.gop

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ c11 := complex(10, 11) // constructor init
77
c22 := 10 + 11i // complex number init syntax
88

99
ccc := complex(2, 3)
10-
cc2 := 4 + 5i // complex initializer syntax a + ib
11-
cc3 := c11 + c22 // addition just like other variables
12-
println "Add: ", cc3 // prints "Add: (6+8i)"
13-
re := real(cc3) // get real part
14-
im := imag(cc3) // get imaginary part
15-
println ccc, re, im // prints 6 8
10+
cc2 := 4 + 5i // complex initializer syntax a + ib
11+
cc3 := c11 + c22 // addition just like other variables
12+
println "Add: ", cc3 // prints "Add: (6+8i)"
13+
re := real(cc3) // get real part
14+
im := imag(cc3) // get imaginary part
15+
println ccc, cc2, re, im // prints 6 8

0 commit comments

Comments
 (0)