+ 1

using factions type program to calculate the area and circumference of a circle note that c++

using factions type program to calculate the area and circumference of a circle note that c++

4th Dec 2017, 5:16 PM
Haider Shmmare
Haider Shmmare - avatar
1 Réponse
+ 3
#include <iostream> using namespace std; class abc; class xyz { int x; public: void set input() { int i; i=x; } friend void max(xyz m,abc n); }; class abc { int y; public: void set input () { int i; i=y; } friend void max(xyz m,abc n); }; void max (xyz m,abc n) { if (m.x>=n.y) cout<<m.x; else cout<<n.y; } int main { abc m; xyz n; m.set input (10) n.set input (20) return 0; }
4th Dec 2017, 5:17 PM
Haider Shmmare
Haider Shmmare - avatar