btaequi.blogg.se

List of twin prime numbers from 1 to 100
List of twin prime numbers from 1 to 100








list of twin prime numbers from 1 to 100

But I want to find the common numbers of those two. This main function gives twin primes and cousin primes. Printf("The number of cousins: %d",count2) I have used unsigned long so that I can use this program to find large number later. The full code is given bellow: int isPrime(unsigned long number)įor (i = 3 i < limit & ! test i+=2, count++)

list of twin prime numbers from 1 to 100

To check the twin numbers and cousin numbers I have done this loop for(i = start i < end i++) SO 7 11 13 17 19 41 43 71 numbers are both in twin primes and cousin primes.

list of twin prime numbers from 1 to 100

I have to find the prime numbers from 1 to 100 that are in twin prime number members as well as cousin prime number members.įor example : 7 is a member of twin prime number as well as a member of cousin prime number.Īnd also, I have to find how many this kind of numbers are there from 1 to 100.Įxplanation : twin primes in 1 to 100 are (3, 5), (5, 7), (11, 13), (17, 19), (29, 31), (41, 43), (59, 61), (71, 73)Ĭousin primes in 1 to 100 are (3, 7), (7, 11), (13, 17), (19, 23), (37, 41), (43, 47), (67, 71), (79, 83)










List of twin prime numbers from 1 to 100