Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include"iostream"
- using namespace std;
- class ED;
- class KE
- {
- private:
- int x;
- public:
- KE(int i)
- {
- x = i;
- }
- friend void KD(KE, ED);
- };
- class ED
- {
- private:
- int x;
- public:
- ED(int i)
- {
- x = i;
- }
- friend void KD(KE, ED);
- };
- void KD(KE k, ED e)
- {
- float km;
- km = e.x / 0.62137;
- km += k.x;
- cout << "The total of this : " << km << endl;
- }
- int main()
- {
- KE k(10);
- ED e(10);
- KD(k, e);
- }
Advertisement
Add Comment
Please, Sign In to add comment