import [Link].
*;
class Complex
{
double real,img;
Complex(double r, double i)
{
[Link] = r;
[Link] = i;
}
static Complex sum(Complex c1, Complex c2)
{
Complex temp = new Complex(0,0);
[Link] = [Link] + [Link];
[Link] = [Link] + [Link];
return temp;
}
}
class ComplexArithmetic
{
public static void main(String args[])
{
Scanner sc=new Scanner([Link]);
double rp,ip;
[Link]("Enter real and imaginary parts of first Complex
number:");
rp=[Link]();
ip=[Link]();
Complex c1 = new Complex(rp,ip);
[Link]("Enter real and imaginary parts of second Complex
number:");
rp=[Link]();
ip=[Link]();
Complex c2 = new Complex(rp,ip);
Complex temp = [Link](c1, c2);
[Link]("Sum of Numbers is: "+ [Link]+" + "+ [Link]
+"i");
}
}