Write a function isprime() which takes a number and returns 1 if the number is prime and 0 otherwise.
What is a prime number in definition? A prime number is a whole number is greater than 1whose only factors are 1 and itself. A factors a whole number that can be divided evenly into another number. The first few prime number are : 2, 3, 5, 7, 11, 13, 17, 19 and 23 etc. The following program check the input number is prime or not. #include <stdio.h> int isprime( int ); int main() { int num; printf( "Enter the Number check it is prime or not :" ); scanf( "%d" ,&num); if (isprime(num)) { printf( "%d is prime number.\n" , num); } else { printf( "%d is not a prime number. \n" ,num); } return 0 ; } int isprime( int n) { int i = 2 ; while (i<n) { ...