0

// x greater than 0. Calculate the // x value for the first case where the difference between the prime number and

the x + 1 prime number is greater than 300.

21st Dec 2020, 7:09 AM
Seda Seda
1 ответ
+ 1
I don't know c-sharp so even if you send a working example, I can't help. But the syntax is pretty easy. Generate the first n prime numbers. Maybe first 100,000. Then search each consecutive one for the difference. If it's not up to 300, then increase the number of primes. Keep increasing the number of primes generated until you get the required difference. I've actually written a program kind of similar to this. But it was written in C. https://code.sololearn.com/cugUOimL532n/?ref=app
13th Jan 2021, 4:13 AM
Sekiro
Sekiro - avatar