answersLogoWhite

0

Store your complex numbers in a structure of some sort that has two variables - one to store the real part and one to store the complex part.

Then to add two complex numbers, add the real parts together and add the complex part together, eg:

(2 + 3i) + (5 - 2i) = ((2 + 5) + (3 + -2)i)

= (7 + i)

how you actually do this will be entirely up to the language you are using for your programming.

User Avatar

Wiki User

13y ago

Still curious? Ask our experts.

Chat with our AI personalities

SteveSteve
Knowledge is a journey, you know? We'll get there.
Chat with Steve
RafaRafa
There's no fun in playing it safe. Why not try something a little unhinged?
Chat with Rafa
MaxineMaxine
I respect you enough to keep it real.
Chat with Maxine

Add your answer:

Earn +20 pts
Q: How do you write a programme to add two complex numbers?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Continue Learning about Math & Arithmetic

How to solve imaginary complex numbers?

That depends a lot on what you want to solve. In general, you can do quite a lot by simply considering the complex number like any polynomial, and remembering that i2 = -1. For example, to add two complex numbers, you simply add the real and the imaginary part of both numbers.


How do you solve complex numbers?

That depends what is the problem given, and what you want to solve. You may want to read an introductory article on complex numbers, to learn how you add them, multiply them, etc.That depends what is the problem given, and what you want to solve. You may want to read an introductory article on complex numbers, to learn how you add them, multiply them, etc.That depends what is the problem given, and what you want to solve. You may want to read an introductory article on complex numbers, to learn how you add them, multiply them, etc.That depends what is the problem given, and what you want to solve. You may want to read an introductory article on complex numbers, to learn how you add them, multiply them, etc.


How do you add complex numbers videos?

See the related link (below) for a video that may help.


How do you write a program in java to read ten numbers and print sum of ten integers?

Add the numbers into one variable as you read them in. But if you prefer, you can read the numbers into an array and then use a loop to add the numbers together.


How do you write a power as a product of the same factor?

You have to add the two numbers together then multiply it by 2.