I not get the question
Prateek loves candy prime
Hi Dhruv,
In Simple Terms,
We have to output to nth Prime number.
Now Consider n=5;
The 5th prime number is 11,
for n=6,its 13.
and son on.
I hope this will help.
how to solve this problem
@Dhruv-Goyal-449223618988467
Lets discuss the approach stepwise:
- need to take input n.
- need to know an efficient algorithm,for generating primes.
- After generating these primes,store in an Array or ArrayList.
- Print the nth prime out of the Array or ArrayList.
For efficient algorithm,for Primes have a look here,
https://www.geeksforgeeks.org/sieve-of-eratosthenes/
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.