0
Write a program to find greatest prime number in an given range
Language is either java or python
3 Answers
+ 1
Hint: a prime number is only divisible by one and itself, there is no shortcut to avoid checking every division possible.
+ 1
If range is from [a,b] (b>a), then start going from b to a, when find prime then break; from loop as it will be the largest prime in that range