#include <iostream>
using namespace std;
struct Imaginary_mult{
double real, Imaginary;
};
// multiplication or two complex equations
// NOTE : whole terms should be either +ive or -ive
// (((( EAGLE ))))
int main ()
{
Imaginary_mult g1,g2,g3;
double num1, num2,num3,num4;
cout << "*******Enter First Comlex Number Equation******\n";
cout << "Enter Real part of Equation: ";
cin >> g1.real;
cout << "Enter Imaginary part of Equation with out iota: ";
cin >> g1.Imaginary;
cout << endl;
cout << "*******Enter Second Complex Number Equation******\n";
cout << "Enter Real part of Equation: ";
cin >> g2.real;
cout << "Enter Imaginary part of Equation with out iota: ";
cin >> g2.Imaginary;
cout << endl;
cout << "The First Equation which you have Entered is:\n" << g1.real <<"+"<< g1.Imaginary << "i" << endl;
cout << "The Second Equation which you have Entered is:\n" << g2.real <<"+"<< g2.Imaginary << "i" << endl;
cout << endl;
cout << "The QUESTION will take this form. " << "(" <<g1.real << "+" << g1.Imaginary <<"i"<< ")" << "(" << g2.real << "+" << g2.Imaginary << "i" << ")" <<endl;
g3.real= g1.real*g2.real;
num1= g1.real*g2.Imaginary+g1.Imaginary*g2.real;
g3.Imaginary= g1.Imaginary*g2.Imaginary;
num2= (g3.Imaginary);
num3=-num2;
num4=g3.real+num3;
cout << endl;
cout << "**The Answe is : " << g3.real << "+" << num1 << "i" << num3 <<endl;
cout << endl;
cout << "***More Simplified Form is : " << num4 << "+" << num1 << "i" << endl;
cout << endl;
return 0;
}
using namespace std;
struct Imaginary_mult{
double real, Imaginary;
};
// multiplication or two complex equations
// NOTE : whole terms should be either +ive or -ive
// (((( EAGLE ))))
int main ()
{
Imaginary_mult g1,g2,g3;
double num1, num2,num3,num4;
cout << "*******Enter First Comlex Number Equation******\n";
cout << "Enter Real part of Equation: ";
cin >> g1.real;
cout << "Enter Imaginary part of Equation with out iota: ";
cin >> g1.Imaginary;
cout << endl;
cout << "*******Enter Second Complex Number Equation******\n";
cout << "Enter Real part of Equation: ";
cin >> g2.real;
cout << "Enter Imaginary part of Equation with out iota: ";
cin >> g2.Imaginary;
cout << endl;
cout << "The First Equation which you have Entered is:\n" << g1.real <<"+"<< g1.Imaginary << "i" << endl;
cout << "The Second Equation which you have Entered is:\n" << g2.real <<"+"<< g2.Imaginary << "i" << endl;
cout << endl;
cout << "The QUESTION will take this form. " << "(" <<g1.real << "+" << g1.Imaginary <<"i"<< ")" << "(" << g2.real << "+" << g2.Imaginary << "i" << ")" <<endl;
g3.real= g1.real*g2.real;
num1= g1.real*g2.Imaginary+g1.Imaginary*g2.real;
g3.Imaginary= g1.Imaginary*g2.Imaginary;
num2= (g3.Imaginary);
num3=-num2;
num4=g3.real+num3;
cout << endl;
cout << "**The Answe is : " << g3.real << "+" << num1 << "i" << num3 <<endl;
cout << endl;
cout << "***More Simplified Form is : " << num4 << "+" << num1 << "i" << endl;
cout << endl;
return 0;
}
No comments:
Post a Comment