forked from natto1784/ooplab
26 lines
362 B
C++
26 lines
362 B
C++
#include <algorithm>
|
|
#include <iostream>
|
|
using namespace std;
|
|
|
|
class Trio {
|
|
private:
|
|
int a, b, c;
|
|
|
|
public:
|
|
Trio(int, int, int);
|
|
friend int biggest(Trio);
|
|
};
|
|
|
|
Trio::Trio(int a, int b, int c) {
|
|
this->a = a;
|
|
this->b = b;
|
|
this->c = c;
|
|
}
|
|
|
|
int biggest(Trio t) { return (max({t.a, t.b, t.c})); }
|
|
|
|
int main() {
|
|
Trio t(444, 4, -44);
|
|
cout << biggest(t);
|
|
}
|