Interview Solution

One of the main causes of the fall of the Roman Empire was that–lacking zero–they had no way to indicate successful termination of their C programs. Robert Firth

Complex number

Language Java | Level Intermediate | Category Interview Problems | July 24, 2015 4:52 pm


Interview Problem

A complex number is a combination of real and imaginary numbers. A+Bi is a complex number where A is the real number and B is the imaginary number.
A complex number is a number that can be expressed in the form a + bi, where a and b are real numbers and i is the imaginary unit,
3 - real number
4 - imaginary number


Add:8.0+6.0i + 4.0+5.0i = 12.0+11.0i
Subtract:8.0+6.0i - 4.0+5.0i = 4.0+1.0i
Multiply:8.0+6.0i * 4.0+5.0i = 2.0+64.0i



Please login to add comments.