I am attempting to write a program that calls a function, finding all prime numbers from 1-1000. My code is as follows, but I can not get it to run. Any suggestions?
Code:#include <stdio.h> int prime(x); main() { int i,d; for(i=1;i<1000;i++) d=prime(int x); printf("%d",d); } int prime(int x) { int temp=x; if(temp%i==0) {return 0; else if(temp%i!=0); {return 1; } } }