fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. int a, b, c;
  6. cin >> a >> b >> c;
  7. if (a <= b && b <= c) {
  8. cout << a << " " << b << " " << c << "\n";
  9. } else if (a <= c && c <= b) {
  10. cout << a << " " << c << " " << b << "\n";
  11. } else if (b <= a && a <= c) {
  12. cout << b << " " << a << " " << c << "\n";
  13. } else if (b <= c && c <= a) {
  14. cout << b << " " << c << " " << a << "\n";
  15. } else if (c <= a && a <= b) {
  16. cout << c << " " << a << " " << b << "\n";
  17. } else {
  18. cout << c << " " << b << " " << a << "\n";
  19. }
  20. return 0;
  21. }
Success #stdin #stdout 0s 5292KB
stdin
Standard input is empty
stdout
-2058976032 21846 32767