#include<stdio.h> int main() { int i,n[10],c=0; printf ("Enter a number \n"); for (i=0;i<=9;i++) scanf ("%d",&n[i]); for (i=1;i<=n;i++) { if(n[i]%i==0) c=c+1; } if (c==2) printf ("The number is PRIME"); else printf ("The number is COMPOSITE"); return 0; }
Next
This is the most recent post.
Previous
Older Post
Subscribe to:
Post Comments
(
Atom
)
thank u Ahmad share with your friends
ReplyDelete