(find maximum number among 5 number that are stored in variables and show 1st maximum)
**
2nd maximum
**3rd maximum
**4th maximum
**5th maximum
using if else
what i have tried
{ int a,b,c,d;
int w=0.0,x=0.0,y=0.0,z=0.0;
cout<<"enter four numbers";
cin<<a<<b<<c<<d;
max= a<b||a<c||a<d||b<a||b<c||b<d||d<a||d<b||d<c;
cout=max:
max2= max>a||max>b||max>c||max||d;
cout<<max2;
max3.....................................
cout<<max3
max4= max3<a||max3<b||max<c||max<d;
cout<<max4;<code>
}
Aucun commentaire:
Enregistrer un commentaire