Answer:
The program in C++ is as follows:
#include<bits/stdc++.h>
using namespace std;
class Complex {
public:
int rl, im;
Complex(){ }
Complex(int Real, int Imaginary){
rl = Real; im = Imaginary;
}
};
int main(){
int real, imag;
cout<<"Real: "; cin>>real;
cout<<"Imaginary: "; cin>>imag;
Complex ComplexNum(real, imag);
cout<<"Result : "<< ComplexNum.rl<<" + "<<ComplexNum.im<<"i"<<endl;
}
Explanation:
See attachment for explanation