this program is to add the two complex nos



 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();
 }

Request for Solution File

Ask an Expert for Answer!!
C/C++ Programming: this program is to add the two complex nos
Reference No:- TGS0175252

Expected delivery within 24 Hours