How to multiply two complex numbers in c++ using complex.H?
Answers
Answered by
0
Explanation:
void multiplication
( ComplexNumber &cn )
{
cout<<“\n\nThe product of the two complex numbers: \n”
<< ” (” << cn.real1 << “+” << cn.img1 <<“i) * (” << cn.real2 << “+” << cn.img2 << “i)”
<< “= ” <<
(cn.real1*cn.real2)- (cn.img1*cn.img2) << “+” << (cn.img1*cn.real2) + (cn.img2*cn.real1) << “i” ;
}
Similar questions