Why do this code get a run-time error ?

Thanks alot!

Code:#include <stdio.h> #include <math.h> int main(int argc, char *argv[]) { int num,i,root; float j=1; printf("Enter a 3 digit number\n"); scanf("%d",num); root=sqrt(num); for (i = 2; j!=2 && i<=root; i++) { if (num%i==0) { j++; } } if (j==2) printf("%d is a prime number",&num); else printf("%d is not a prime number",&num); system("PAUSE"); return 0; }