0
How to write a program to find a number having maximum divisors ,in given range?
m
3 odpowiedzi
+ 1
If I understood you correctly, you want to find the divisors of a number that fall in a certain range. Although I think optimizations can be made, you could just loop in the range with a cycle and test if the division remainder is zero with the current divisor.
I wrote a code doing this, hope it helps.
(You didn't specify in which language you want to achieve this, so I chose C++. Edit: I see your other codes are in C++ as well, so it was a good choice. :D)
https://code.sololearn.com/cJxd646D2Q5v/?ref=app
0
yes i was wanted C++ code.thanks for your help
0
this code has given me more than one number.but i want only one number in range which has maximum divisors