prime numbers protocol

int is_prime(int i, int N, int j);
void setup() {
  Serial.begin(115200);
  Serial.print("Prime Number Calculator");
  Serial.print("\n");
  
}

void loop() {
int N,i,j;
Serial.print("Input N (>1):   ");
while(Serial.available ()==0);
N=Serial.parseInt ();
N= is_prime(i,j,N);
Serial.print(i);Serial.print("\t");
}
int is_prime(int i, int N, int j){
  for(i=1; i<=N; i++){
    boolean flag=true;
     for(j=2; j<=(i-1); j++){
      if(i%j==0){
        flag=false;
        break;
      }
     }
     if(flag==true){
       return(i);
     }
  }
}

The project has me ask the user for a number, from that i have to use a prototype function to see if its prime and print.
I cant figure out a away to call the function or if i need to change to prototype. Any suggestions?

Arduino generates function prototypes for you

BTW you only need to test odd numbers for primacy.

TheMemberFormerlyKnownAsAWOL:
BTW you only need to test odd numbers for primacy.

False. 2 is prime.

Look at the pseudocode in the simple methods section here: Primality test - Wikipedia

Your code has various oddities, including passing a loop variable into a function when its local to the function.

Your compiler warnings are

sketch_apr09a.ino: In function 'int is_prime(int, int, int)':
sketch_apr09a.ino:30:1: warning: control reaches end of non-void function [-Wreturn-type]
sketch_apr09a.ino: In function 'void loop()':
sketch_apr09a.ino:14:19: warning: 'i' is used uninitialized in this function [-Wuninitialized]
sketch_apr09a.ino:14:19: warning: 'j' is used uninitialized in this function [-Wuninitialized]

Always turn on full warnings and read them...