Write a program to input two complex numbers and to find sum of the given complex numbers.

4 views

1 Answers

areal = input("Enter real part of first complex number”)

aimg = input("Enter imaginary part of first complex number”)

breal = input("Enter real part of second complex number”)

bimg = input("Enter imaginary part of second complex number”)

totreal = areal + breal

totimg = aimg + bimg

print “Sum of the complex numbers=",totreal, “+i”, totimg

4 views