An example Analysis of the output of Twin Primes in C language
Today, I will talk to you about the example analysis of the output of twin primes in C language, which may not be well understood by many people. in order to make you understand better, the editor has summarized the following content for you. I hope you can get something according to this article.
1. Topic content:
Twin primes are adjacent primes with an interval of 2, for example, the smallest pair of twin primes is 3 and 5, and so are 5 and 7 (5 is repeated but counted as 2 groups).
two。 Input format:
Enter N to find out the group number of twin primes between 2 and N.
It should be noted that the input N does not exceed the maximum range represented by int
3 output format:
Output the number of prime twins between 2 and N, and then output the number of groups.
The code is as follows:
# includeint Function (int n) / / function to determine whether it is a prime {for (int iTunes 2; I)