This program is ot showing output for first two testcases
Hello @Namanjain123,
-
As the value of n could be 5000000.
So, the 5000000th prime number would be larger than 5000000.
Hence, you are required to increase the size of max to 100000007 (chosen by hit and trial method). -
The logic is not optimal.
Modified Code:
Hope, this would help.
Give a like if you are satisfied.