answersLogoWhite

0


Best Answer

It should not be even (except for 2), and must not be dividable with any odd number between 3 and its square-root.

User Avatar

Wiki User

13y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Find whether a number is prime or not using c?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

How can find prime number by using if in vbscript?

Dim prime, nprime = TRUEn=cint(inputbox("Enter a number to find whether it is Prime or Not"))for i=2 to (n-1)If n mod i = 0 thenprime = FalseExit forEnd ifNextIf prime thenmsgbox "Yes! It is a Prime number"Elsemsgbox "No! it is not a prime number"End if


How do you find the 12th prime number using c?

To keep it simple: Write a main loop that goes through all the numbers, starting with 2, and incrementing one at a time. Determine whether each number is a prime number. If it is, increment a counter. To determine whether each number is a prime number, either use an inner loop, or a separate function. Test divisibility of the number "n" by every number from 2 to n-1. If you find a factor, then it is not a prime number. Note that you can test divisibility by using the "%" operator. For example: if (number % factor == 0) // number is divisible by factor else // it isn't


What is a method to create a prime number?

No specific method has been discovered so far,not even by the greatest mathematicians,to create a prime number or to find out all the prime numbers......but there's a way to find whether a number is prime or not,i.e,by dividing that number with the first prime nos. such as 2,3,5,7,11 and so on and seeing whether it is exactly divisible or not.If it is not,then it can be classified as a prime no.


How do you find Number of prime numbers below certain number?

You just have to work out it,take each number below it and check whether it is prime or not.


How do you find prime numbers between 2 and 70?

You can check each individual number, whether it is a prime number. For numbers below 100, it is enough to check whether they are divisible by 2, by 3, by 5, and by 7. If a number is divisible by none of these, it is a prime number.


Write a java programme to check whether the number is twin prime or not?

Find a prime number, add 2 to the number. Check if the new number is prime. IE : 3 is prime. 3+2 =5. 5 is prime. (3,5) are twin primes.


How do you find whether a number is a perfect square by using its prime factors?

In the prime factorisation of the number, each factor must appear an even number of times.In the prime factorisation of the number, each factor must appear an even number of times.In the prime factorisation of the number, each factor must appear an even number of times.In the prime factorisation of the number, each factor must appear an even number of times.


How do you find prime number?

Prime numbers are the numbers that can only be divided by 1 and them selves. As in 13 if you were to factor it using only whole numbers you would see that its factors are only 1 and 13. There for it is prime. While 12 you see that the factors are 1,2,3,4,6,12 meaning that it is not prime.You test several numbers, to see whether they are prime numbers, until you find a prime number.


How do you find the prime number of 6 using a tree diagram?

6 2,3


How do you find the prime factorization of 34?

One way to find the prime factorization of a number is to start with the lowest prime number and see if it evenly divides the number. If it does, check whether the result of the division is divisible by that same prime number. When the prime number you are testing does not evenly divide that number, continue with the next prime number. Continue this until the result of the division is a prime number.Check whether 34 is divisible by 2:34 ÷ 2 = 1717 is a prime number, so the prime factorization is finished.The prime factorization of 34 is 2 x 17.Another way to find the prime factorization of a number is to choose a factor pair for that number. Then, find a factor pair for each of those numbers that is not prime.A factor tree of 34 is34/ \2 17Both 2 and 17 are prime, so the tree is finished.The prime factorization of 34 is 2 x 17.


How do you find the LCM of a composite number?

You need at least two numbers to find an LCM. It doesn't matter whether they are prime or composite.


With a given big integer number which is the product of two prime numbers how do you find them?

First write a program to generate the prime number. After one prime number was generated, divide the big int number by the prime number. If the remainder is zero then quotient is the second prime number ( also it is important to check whether the quotient is prime number or not because sometimes you will get wrong answer). Repeat the process until you get the result.