THIS PROGRAM IS TO ADD THE TWO COMPLEX NO.S GIVEN BY THE USER
*/
#include
#include
#include
struct complex
{
int real;
int imag;
};
void main()
{
clrscr();
complex a,b,c;
cout<<"input the real part for first complex number : ";
cin>>a.real;
cout<<"input the imaginary part for first complex number : ";
cin>>a.imag;
cout< cout<<"input the real part for second complex number : ";
cin>>b.real;
cout<<"input the imaginary part for second complex number : ";
cin>>b.imag;
c.real = a.real + b.real;
c.imag = a.imag + b.imag;
cout< cout<<"the sum is : "< getch();
}