C Program to find multiplication of complex numbers

itstudentjunction


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 two complex numbers


Write a C program to find multiplication of two 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

 

list of c programs




Most popular programs




print factorial number
function with no args & return value
even / odd using c
perfect number
write a program to find prime factors
pascal Triangle
check string length strlen
convert a string to lowercase
simple interest using macros
armstrong or not in c
prime numbers
towers of hanoi
multiplication of two matrices
Floyd’s Triangle
last occurrence of substring
first occurrence of substring
write a Program to print reverse number
write a C program to find multiplication of complex numbers
string combinations
external variable scope
palindrom number
find prime or not  
strong or not
check substring
find factors
multiplication of sparse matrices
reverse string strrev
biggest of three numbers
largest and smallest values in array
function with no args & no return value
concatinate strings strCat
write a program to check palindrome string
prime numbers
compare strings strcmp
strong numbers
perfect numbers
last occurrence of character
copy one file to other file
function with args & no return value
students scoring 50% more marks
add sparse matrices
display character graph
gcd using recursion
first occurrence of character
maximum and minimum values
convert to uppercase
result of power value
find reverse number using recursion
static variable scope
sizes of various data types
permutations
combinations
area of triangle
function with args & return value
print pyramid of stars
numbers in words format
write a C program for automatic variable scope
represent sparse matrix
add subtract two complex numbers
wrire a program to show student grades
implement sparse matrix
achromatic string
biggest of three numbers
escape charaters
logical operations
swap numbers without temp
write a C program to multiply complex numbers
add modify delete employee data
register variable scope
swap numbers using call by reference
student records into file