#include<stdio.h>
#include<conio.h>
void main()
{
int n,i=2,f=1;
clrscr();
printf("Enter Any Number : ");
scanf("%d",&n);
 while(i<=n/2)
 {
  if(n%i==0)
  f=0;
  break;
 }
  i++;
 if(f==1)
   printf("this number is prime number");
   else
   printf("this number is not-prime number");
 getch();
}
INPUT
Enter Any Number : 11
OUTPUT
this is prime number

Leave a Reply

Subscribe to Posts | Subscribe to Comments

All Notes on BCA

All Notes  on BCA
BCA all subjects notes

Total Pageviews

Translate

Powered by Blogger.

Copyright © All Notes on BCA