Files
ooplab/lab4/10.cpp
Amneesh Singh ad185c994e labs 1-6: init
Signed-off-by: Amneesh Singh <natto@weirdnatto.in>
2022-12-24 14:03:08 +05:30

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);
}