Lucian_Adrian

Untitled

Aug 4th, 2021
34
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.30 KB | None | 0 0
  1. #include <iostream>
  2. using namespace std;
  3. int main(){
  4. int a, b, c;
  5. cin >> a >> b >> c;
  6. int min = a, max = a;
  7. if(b > max)
  8. max = b;
  9. if(c > max)
  10. max = c;
  11. if(b < min)
  12. min = b;
  13. if(c < min)
  14. min = c;
  15. cout << max - min;
  16. return 0;
  17. }
Advertisement
Add Comment
Please, Sign In to add comment