#include <iostream> #include <conio.h> using namespace std; class Banding { friend istream& operator>>(istream&, Banding&); public: void bandingkan() { if ((x>y) && (x>z)) cout << "Bilangan terbesar : " << x; else if ((y>x) && (y>z)) cout << "Bilangan terbesar : " << y; else cout << "Bilangan terbesar : " << z; } private: int x, y, z; }; istream& operator>>(istream& in, Banding& bilangan){ cout << "Bilangan pertama = "; in >> bilangan.x; cout << "Bilangan kedua = "; in >> bilangan.y; cout << "Bilangan ketiga = "; cin >> bilangan.z; return in; }; main() { Banding bilangan; cin >> bilangan; bilangan.bandingkan(); getch(); return 0; }