K is a three digit number such that the ratio of the number to the sum of its digits is least . For how many values of k will the ratio be the highest.?
a.9 b.8 c.7 d.none of these
float i,j,k, high=1; for(i=1;i<10;i++) { for(j=0;j<10;j++) { for(k=0;k<10;k++) { if(high < (100i + 10j +k)/(i+j+k)) high = (100i + 10j +k)/(i+j+k) ; } } } You can find the highest ratio from here. After that you may execute this : int count=0; for(i=1;i<10;i++) { for(j=0;j<10;j++) { for(k=0;k<10;k++) { if((100i + 10j +k)/(i+j+k) == high) count++; } } } value ofcount will be your final answer. Sorry this was not mathematical, but it was worth a programming approach . :|
cant use programming in exam... can u explain solution in mathematical form
least highest ? least means almost 0 highest is 1 hmmmm
Join our real-time social learning platform and learn together with your friends!