first test post with all from main post website

A prime number (or a prime) is a natural number greater than 1 that has no positive divisors other than 1 and itself. A natural number greater than 1 that is not a prime number is called a composite number.

Example C Program to find whether a number is Prime or Composite Number

 1 #include<stdio.h>
 2 int main()
 3 {
 4  int number, counter, isprime = 0;
 5  
 6  /*Ask the uesr to Enter a Positive Integer */
 7  printf("Enter the positive integer to check for prime or composite\n");
 8  scanf("%d",&number);
 9 
10  /*Check the remainder for zero when you divide the numbers. if remainder is zero then it means that the number is completely divisible by another another and hence it can not be prime*/
11  for(counter = 2; counter <= number/2; counter++){
12   if( (number % counter) == 0 ){
13    isprime = 1;
14    break;
15   }
16  }
17 
18  /* isprime == 0 means it is a prime number */
19  if(isprime == 0){
20   printf("%d is a prime number",number);
21  }else{
22   printf("%d is a composite number",number);
23  }
24  return 0;
25 }