C Program to find multiplication of complex numbers

itstudentjunction


write a C Program to find multiplication of complex numbers



Multiply complex numbers:



Given two complex numbers 2 + 3i , & 3 + i The result of multiplication is

(2 + 3i) (3 + i )= 6 + 2i + 9i + 3i2
since i2 = -1
=> 6 + 11i - 3 =3 + 11i



Write a c program to multiply or find / show multiplication of complex numbers


Write a c program to multiply two complex numbers


#include<stdio.h>
int main(){
int a,b,c,d,x,y;
printf("\nEnter the first number:");
scanf("%d%d",&a,&b);
printf("\nEnter the second number:");
scanf("%d%d",&c,&d);
x=|( a * c ) - ( b * d )|;
y= ( a * d ) + ( b * c );
printf("\n The result is %d + %d i :", x, y);
}

OUTPUT:

Enter the first number:2 3

Enter the second number: 5 2

The result is : 4 + 19i


Other related programs:



write a c program to print addition subtraction of two complex numbers

write a c program to multiply or find multiplication of complex numbers

write a c pprogram to show multiplication of two matrices or multiply two matrices

write a c program to multiply two sparse matrices or find multiplication of sparse matrices

write a c program to show addition of two matrices