#include#include <conio.h> void main() { int num, c; printf("Enter a number: "); scanf("%d", &num); if ( n == 2 ) printf("Given number is Prime"); else { for ( c = 2 ; c <= n - 1 ; c++ ) { if ( n % c == 0 ) break; } if ( c != n ) printf("Given Number is not Prime"); else printf("Given number is Prime"); } getch(); }
WHAT'S NEW?
Loading...
0 comments:
Post a Comment