0

# Write a c Program to add subtract multiply and divide the two complex numbers?

Updated: 10/26/2022

Wiki User

12y ago

#include<stdio.h>

#include<conio.h>

void main()

{

int a,b,c,d,e,ch;

clrscr();

printf("enter 1st no\n");

scanf("%d",&a);

printf("2nd no\n");

scanf("%d",&b);

scanf("%d",&ch);

switch(ch)

case 1:

c=a+b;

printf("%d",c);

break;

case 2:

d=a-b;

printf("%d",d);

break;

case 3:

e=a*b;

printf("%d",e);

break;

}

getch();

}

Wiki User

12y ago

Earn +20 pts
Q: Write a c Program to add subtract multiply and divide the two complex numbers?
Submit
Still have questions?
Related questions

### How can a GUI of a program to add subtract multiply and divide the two numbers look like?

Take a look at the Windows Calculator.

-137

### How do you multiply consecutive numbers?

you divide and divide again then multiply then add then subtract then finally get the root

-10015

### What combination of numbers always results in an odd number?

Multiply two odd numbers Add an even and an odd Subtract an odd and an even

### How do you calculate imaginary numbers?

Usually you don't use pure imaginary numbers, but complex numbers - numbers that have a real and an imaginary part. To add and subtract complex numbers, you add and subtract the components (just like any other vector). That is, you add (or subtract) the real part and the imaginary part separately. To multiply them, you multiply the components, just like you would multiply any two polynomials - multiply each part of the first number by each part of the second number. Remember that i2 = -1. Combine the real and the imaginary parts. To divide, consider the division as a fraction, and multiply top and bottom by the complex conjugate. For example, if you are dividing by (2 + 3i), multiply numerator and denominator by (2 - 3i). This will convert the denominator into a real number. Another way to multiply is to convert the complex numbers into polar coordinates (absolute value, i.e., length, and angle). Multiply the absolute values (which are real numbers) together, and simply add the angles. For example, (3 angle 30&Acirc;&deg;) x (4 angle 20&Acirc;&deg;) = (12 angle 50&Acirc;&deg;). You may need to convert the result back to rectangular coordinates in the end. Note that scientific calculators usually have an option to quickly convert from rectangular to polar, or polar to rectangular, coordinates.

41

69

### What happens when you add subtract multiply and divide rational numbers?

If you add, subtract or multiply rational numbers, the result will be a rational number. It will also be so if you divide by a non-zero rational number. But division by zero is not defined.

### The first problem is 4 the rule is multiply by 2 then subtract 3 what are the first 6 numbers in a pattern?

Homework question: The first numbetr is 4. A rule is multiply by 2 and then subtract 3. What are the first 6 numbers in the pattern