Add two complex numbers

Description:

using binary operator '+' and to add two set of complex numbers. Sample: 2 set of variable each variable should contain 2 real numbers. By giving those real numbers the program intake as a imaginary values and add those values. Test Case 1 Input (stdin) 5 6 7 8 Expected Output 5+6i 7+8i Addition of Real and Imaginary Numbers: 12+14i Test Case 2 Input (stdin) 8 2 4 3 Expected Output 8+2i 4+3i Addition of Real and Imaginary Numbers: 12+5i

Program :

#include <iostream>

using namespace std;

int main()

{

int a,b,c,d;

  cin>>a>>b>>c>>d;

  cout<<a<<"+"<<b<<"i\n";

  cout<<c<<"+"<<d<<"i\n";

  cout<<"Addition of Real and Imaginary Numbers:\n";

  cout<<a+c<<"+"<<b+d<<"i";

return 0;

}