/*
Sortowanie trzech liczb przez wymianę wartości
instrukcja sterująca if(...) { ... }
operatory <, <=, >, >=
zmienne pomocnicze




















*/
#include <iostream>

using namespace std; // w starszych kompilatorach trzeba zakomentować ten wiersz

int main()
  {
   cout<<"Podaj trzy liczby: ";
   double A,B,C
   cin>>A>>B>>C;
   if(cin.good())
     {
      if(A<B) { double x=A; A=B; B=x; }
      if(A<C) { double x=A; A=C; C=x; }
      if(B<C) { double x=B; B=C; C=x; }
      cout<<"Wzrastajaco: "<<A<<' '<<B<<' '<<C<<endl;
      cout<<"Malajaco: "<<C<<' '<<B<<' '<<A<<endl;
     }
   else
     {
      cin.clear();
      cout<<"Blad wprowadzenia"<<endl;
     }
   cin.ignore(1024,'\n');
   cin.get();
   return 0;
  }
 
