Advertisement
Josif_tepe

Untitled

Feb 9th, 2024
832
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.27 KB | None | 0 0
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5.     int a, b, c;
  6.     cin >> a >> b >> c;
  7.    
  8.     int x = b - a - 1;
  9.     int d = c - b - 1;
  10.    
  11.     if(x > d) {
  12.         cout << x << endl;
  13.     }
  14.     else {
  15.         cout << d << endl;
  16.     }
  17.     return 0;
  18. }
  19.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement