Created
September 1, 2018 09:57
-
-
Save rootxnaresh/cfbf8c6ecbe44561a4c01c1cc0b65c42 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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