Skip to content

Instantly share code, notes, and snippets.

@rootxnaresh
Created September 1, 2018 09:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rootxnaresh/cfbf8c6ecbe44561a4c01c1cc0b65c42 to your computer and use it in GitHub Desktop.
Save rootxnaresh/cfbf8c6ecbe44561a4c01c1cc0b65c42 to your computer and use it in GitHub Desktop.
#include <iostream>
using namespace std;
class complex
{
public:
int x,y,z,i;
void input();
friend void output(complex);
};
void complex::input()
{
cin>>x>>y;
}
void output(class complex o1)
{
int i;
cout<<o1.x<<"+i"<<o1.y;
}
int main()
{
complex o;
o.input();
output(o);
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment