given below:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include<stdio.h> | |
#include<conio.h> | |
int main() | |
{ | |
int n,i; | |
printf("enter any number"); | |
scanf("%d",&n); | |
i=2; | |
while(i<n) | |
{ | |
if(n%i==0) | |
break; | |
i++; | |
} | |
if(i==n) | |
printf("The entered number is prime"); | |
else | |
printf("The entered number is composite"); | |
getch(); | |
} |
0 comments :
Post a Comment