forked from natto1784/ooplab
25
lab4/10.cpp
Normal file
25
lab4/10.cpp
Normal file
@@ -0,0 +1,25 @@
|
||||
#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);
|
||||
}
|
Reference in New Issue
Block a user