Take three input number and show larger one

 #include<iostream>

using namespace std;

int main(){

    int num1,num2,num3;

    cout<<"ENTRE FIRST NUMBER  : ";

    cin>>num1;

    cout<<"ENTRE second NUMBER  : ";

    cin>>num2;

    cout<<"ENTRE third NUMBER  : ";

    cin>>num3;

    (num1 > num2 && num1 > num3)?cout<<num1<<"  IS THE HIGHEST NUMBER":(num2 > num1 && num2 > num3)?cout<<num2<<"  IS THE HIGHEST NUMBER":(num3 > num2 && num3 > num2)?cout<<num3<<"  IS THE HIGHEST NUMBER":cout<<"ALL ARE SAME";

    return 0;

}

Comments

Popular Posts