answersLogoWhite

0


Best Answer

Try this

input "z =?";x,y

print "z=";x;"+";y;"i"

input "w =?";u,v

print "w=";u;"+";v;"i"

print "z+w = ";x+u;"+";y+v;"i"

print "z*w = ";x*u-y*v;"+";x*v+y*u;"i"

example output:

z=? 1,2

w=? 2,3

z+w = 3+5i

z*w = -4+7i

Note that it is possible to input negative imaginary parts. To display the sum and product correctly in that case, you need to make an intermediate step in the program which assigns the imaginary part to a separate variable, decide whether or not the imaginary part is negative, and then print a "+" if it is positive or no sign when it is negative (printing a negative number will automatically print the negative sign).

Of course, you need to modify the program to your computer language.

User Avatar

Wiki User

11y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Program which inputs two complex numbers and finds the sum and product of those numbers?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

What is the product of a number that is half of 12?

A product is a operation involving two or more inputs (numbers, matrices, etc). A "number that is half of 12" comprises only a single number and so there cannot be any product.


What are the inputs to make a product?

Money, people, materials


What inputs letters numbers and special command?

Saviorit


How do you make program specification?

you first of all state the function of the program. State the inputs that will be used,the algorithm and the outputs of the program.


How do you find a product of a decimal number?

A single number cannot have a product: a product is the result of a BINARY OPERATION and this means that it must have two inputs.


Describe the inputs required by a business labor?

Inputs for business labor include workers and raw materials. The type of raw materials used varies depending on the product.


What device inputs letters numbers and special commands?

The computer keyboard.


What is a set of numbers containing all of the inputs of a function called?

the domain of the function


Marginal product curve?

A marginal product curve is a visual presentation that demonstrates the relationship between the marginal product and the quantity of its input. All other inputs are fixed.


What is the product of 375?

"Product" is a binary function. A binary function is one where you take two numbers and combine them according to some specified rule and the result is one number. In other words: two inputs giving one output (or answer). You have given only one number (input) so there is no answer to the question.


What is the product of 40?

Product (or multiplication) is a binary operator. It takes two inputs and gives one output. For example, the product of 3 and 4 is 12. The product of just one number does not make mathematical sense.


What is the concept of complex frequency in basic circuits?

Complex frequency is utilized in electric circuits in order to simplify the math, essentially. It is very similar to the use of phasors, except complex frequency can cover all types of inputs, not just sinusoids.