Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main() {
- int a, b, c;
- cin >> a >> b >> c;
- for(int i = 0; i <= 500; i++) {
- if(a + i > b and a + i > c) {
- cout << i << endl;
- break;
- }
- }
- for(int i = 0; i <= 500; i++) {
- if(b + i > a and b + i > c) {
- cout << i << endl;
- break;
- }
- }
- for(int i = 0; i <= 500; i++) {
- if(c + i > a and c + i > b) {
- cout << i << endl;
- break;
- }
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement