+ 2

Find the largest digit smong the two given integer and print the integer with laegest digit.if both the largest number.

sample input1: 387 639 output1: 639 input2: 473 276. output2:276

24th Jan 2018, 2:06 AM
😎😎Harini Palanisamy😎😎
😎😎Harini Palanisamy😎😎 - avatar
2 Answers
+ 3
24th Jan 2018, 6:10 AM
Fabio
+ 1
Divide the first int by 100. save the result in an array. 387/100=3 (387-3*100)/10=8 387-3*100-8*10=7 Then you do the same with the second number but save it in a different array. Then you search each array for the highest diggit. And then compare both highest digits and print the winning int.
24th Jan 2018, 2:25 AM
Dnyl