Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<iostream>
- #include<iomanip> //for setprecision()
- #include<cstdio> //for scanf()
- #include<cmath> //for abs()
- using namespace std;
- int main()
- {
- int a, b, c;
- scanf("%d %d %d", &a, &b, &c);
- int maior_1 = (a+b+abs(a-b)) / 2;
- int maior_2 = (maior_1+c+abs(maior_1-c)) / 2;
- cout << maior_2 << " eh o maior" << endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement