Complex Number Class
Complex Number Class.... Doubt
Send Feedback
Complex Number Class.... Doubt
if C1 = 4 + i5 and C2 = 3 +i1
C1.plus(C2) results in:
C1 = 7 + i6 and C2 = 3 + i1
if C1 = 4 + i5 and C2 = 1 + i2
C1.multiply(C2) results in:
C1 = -6 + i13 and C2 = 1 + i2
a + ib
Line 1 : Two integers - real and imaginary part of 1st complex number
Line 2 : Two integers - real and imaginary part of 2nd complex number
Line 3 : An integer representing choice (1 or 2) (1 represents plus function will be called and 2 represents multiply function will be called)
Check details of 'print' function given above.
4 5
6 7
1
10 + i12
4 5
6 7
2
-11 + i58
Comments
Post a Comment