labs 1-6: init

Signed-off-by: Amneesh Singh <natto@weirdnatto.in>
This commit is contained in:
2022-12-24 14:03:08 +05:30
commit ad185c994e
26 changed files with 2250 additions and 0 deletions

25
lab4/10.cpp Normal file
View 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);
}