#include<iostream>usingnamespacestd;intmain(){intram_age,sulabh_age,ajay_age;cout<<"Enter Ram age:";cin>>ram_age;cout<<"Enter Sulabh age:";cin>>sulabh_age;cout<<"Enter Ajay age:";cin>>ajay_age;if(ram_age<sulabh_age&&ram_age<ajay_age)cout<<"Ram is youngest";elseif(sulabh_age<ram_age&&sulabh_age<ajay_age)cout<<"Sulabh is youngest";elsecout<<"Ajay is youngest";return0;}
The Output Is:
SAMPLE RUN # 1
Enter Ram age:45
Enter Sulabh age:34
Enter Ajay age:22
Ajay is youngest
SAMPLE RUN # 2
Enter Ram age:45
Enter Sulabh age:34
Enter Ajay age:39
Sulabh is youngest
SAMPLE RUN # 3
Enter Ram age:25
Enter Sulabh age:34
Enter Ajay age:29
Ram is youngest
Post a Comment