+ 1

I m not understandinghow to find the largest of 2 nos

12th Mar 2017, 5:38 AM
Deep Doshi
Deep Doshi - avatar
3 Answers
+ 14
if(no1>no2) { largest=no1; } else { largest =no2; } // and print the largest. // or second and easy way largest =(no1>no2?no1:no2);
12th Mar 2017, 5:52 AM
Mansi Dagla
Mansi Dagla - avatar
+ 2
lar = (no1>no2)?no1:no2; cout << "Lagest value is "<< lar <<endl;
12th Mar 2017, 5:56 AM
Aditya kumar pandey
Aditya kumar pandey - avatar
0
thank you
12th Mar 2017, 5:53 AM
Deep Doshi
Deep Doshi - avatar