Sie sind auf Seite 1von 1

#include <cstdlib>

#include <iostream>
using namespace std;
int main(int argc, char *argv[])
{ int x,y,z;
cout<<"ordenar tres numeros"<<endl;
cout<<"ingrese el primer numero: ";
cin>>x;
cout<<"Ingrese el segundo numero : ";
cin>>y;
cout<<"Ingrese el tercer numero :";
cin>>z;
if(x>y && y>z){
cout<<x<<">"<<y<<">"<<z<<endl;
}
if(x>z && z>y){
cout<<x<<">"<<z<<">"<<y<<endl;
}
if(y>x && x>z){
cout<<y<<">"<<x<<">"<<z<<endl;
}
if(y>z && z>x){
cout<<y<<">"<<z<<">"<<x<<endl;
}
if(z>y && y>x){
cout<<z<<">"<<y<<">"<<x<<endl;
}
if(z>x && x>y){
cout<<z<<">"<<x<<">"<<y<<endl;
}
system("PAUSE");
return EXIT_SUCCESS;
}

Das könnte Ihnen auch gefallen