1.

Write an algorithm to check the wheather input number is prime numbers or not?

Answer»

A prime number is a natural number greater than 1 that has no POSITIVE DIVISORS other than 1 and itself. Check whether N is a multiple of any INTEGER between 2 and n. #define ll long long  #define M(x,i) memset(x,i,sizeof(x))    for(i=2;i sqrt(n), * sqrt(n), which CONTRADICTS the expression “a * b = n”. Check whether n is multiple of any integer between 2 and sqrt(n).Explanation:



Discussion

No Comment Found