Write a program to overload inequality operator for complex number using class.

#include<iostream>
using namespace std;
class complex
{
double real;
double imag;
public:
int operator!=(complex c)
{
if( (real!=c.real) && (imag!=c.imag) )
return 1;
else
return 0;
}
void display()
{
cout<<“(“<<real<<“,”<<imag<<“)”<<endl;
}
void set()
{
cout<<“Enter real: “<<endl;
cin>>real;
cout<<“Enter imag: “<<endl;
cin>>imag;
}
};
int main()
{
complex c1,c2;
c1.set();
c2.set();
if(c1!=c2)
cout<<“Complex Number are not equal: “<<endl;
else
cout<<“Complex Number are Equql: “<<endl;
c1.display();
c2.display();
system(” pause”);
}