answersLogoWhite

0

I found this class that defines complex numbers, and has the capacity of adding them, and much more:

http://www.math.ksu.edu/~bennett/jomacg/c.html

Basically, you define a class with two fields, one for the real part, and one for the imaginary part.

User Avatar

Wiki User

14y ago

What else can I help you with?

Continue Learning about Math & Arithmetic

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 programme to add two complex numbers?

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.


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 to create Add square of two complex numbers and print?

To add the squares of two complex numbers in Python, you can use the complex type and perform arithmetic operations directly. First, define the complex numbers, for example, z1 = complex(a, b) and z2 = complex(c, d). Then, compute their squares using z1**2 and z2**2, and add the results: result = z1**2 + z2**2. Finally, print the result using print(result).


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.

Related Questions

Can we add website link when we write java program?

yes ,i can add the website link in java program when we write.


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.


What is add method in a java program?

If the "add" is part of the Java Collections API then calling c.add(o) adds an object o to the given collection (list or set). Likewise, the AWT API has add methods to add components to a Frame or Panel.


How do you find the average of 5 numbers using static method in java?

Add the five numbers; divide the result by 5.


How do you add import packages to a java program in netbeans?

package thisPackage; import otherPackage.*; class myClass { }


How do you write a programme to add two complex numbers?

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.


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 to create Add square of two complex numbers and print?

To add the squares of two complex numbers in Python, you can use the complex type and perform arithmetic operations directly. First, define the complex numbers, for example, z1 = complex(a, b) and z2 = complex(c, d). Then, compute their squares using z1**2 and z2**2, and add the results: result = z1**2 + z2**2. Finally, print the result using print(result).


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.


What are the similarities between vectors and complex numbers?

If you add two complex numbers, the resulting complex number is equivalent to the vector resulting from adding the two vectors. If you multiply two complex numbers, the resulting complex number is equivalent to the vector resulting from the cross product of the two vectors.


How do you add a variable from a Java program into a database through an SQL command within the Java program?

depends on the database you're trying to insert into for sql specifics, but... http://www.exampledepot.com/egs/java.sql/Insert.html provides a very good oracle answer/example.


What are the numbers when you add you get -3 when multiplied you get 40?

There are no two real numbers that do. Using complex numbers, these two do: (-3/2 + i√151/2) & (-3/2 - i√151/2) Two numbers that add to -3 and multiply to -40 are -8 & 5 Two numbers that add to 3 and multiply to -40 are 8 & -5 Two complex numbers that add to 3 and multiply to 40 are (3/2 + i√151/2) & (3/2 - i√151/2)