#include<stdio.h> #include<conio.h> #include<stdlib.h> #include<math.

h> void main() { int n; int c; int i; clrscr(); printf("enter the number you want to test"); scanf("%d", &n); if (n==2); {printf("its prime"); getch(); return 0; } c=sqrt(n); if (n%c==0) printf("its not prime"); else printf("its prime"); getch(); }

Sign up to vote on this title
UsefulNot useful