dimanche 1 mars 2015

Is there any problemin my program below? [on hold]



#include<stdio.h>
#include<conio.h>
int main(void)
{
int num,i,p;
printf ("enter no");
scanf("&d",&num);
p=1;
for(i=2;i<=num/2;i=i+1)
if((num%i)==0) p=0;
if(p==1) printf("the number is prime.\n");
else printf( the number is not prime.\n);

getch();
}




Aucun commentaire:

Enregistrer un commentaire