You are on page 1of 1

Compairing:

#include <iostream>
using namespace std;
int main()
{
int x=0.0;
int y=0.0;
int z=0.0;

cout<<"Enter Number 1: "<<endl;


cin>>x;
cout<<"Enter Number 2: "<<endl;
cin>>y;
cout<<"Enter Number 3: "<<endl;
cin>>z;

if(x>=y&&x>=z&&y>=z)
{
cout<<"Largest: "<<x<<endl;
cout<<"MIddle: "<<y<<endl;
cout<<"Smallest: "<<z<<endl;
}
else if(y>=x&&y>=z&&x>=z)
{
cout<<"Largest: "<<y<<endl;
cout<<"MIddle: "<<x<<endl;
cout<<"Smallest: "<<z<<endl;
}
else
{
cout<<"Largest: "<<z<<endl;
cout<<"MIddle: "<<y<<endl;
cout<<"Smallest: "<<x<<endl;
}
return 0;
}

You might also like