# Question Solved1 AnswerWrite a C program to generate prime numbers which has two equidistant prime numbers from it within a given range. For example, 5 is one such number because we have two prime numbers 3 and 7 both of which are equidistant from 5. The distance in this case would be 2. Can you generate all such numbers in ascending order within a given range along with their corresponding two prime numbers and distance? Sample Input/Output Input: 2 10 Output 3 5 7 2 Input 10 30 Output 11 17 23 6 17 23 29 6

ERLDCL The Asker Ā· Computer Science

Write a C program to generate prime numbers which has two equidistant prime numbers from it within a given range.

For example, 5 is one such number because we have two prime numbers 3 and 7 both of which are equidistant from 5. The distance in this case would be 2.

Can you generate all such numbers in ascending order within a given range along with their corresponding two prime numbers and distance?

Sample Input/Output

Input:

2 10
Output

3 5 7 2

Input
10 30
Output

11 17 23 6

17 23 29 6

More