So, I'm just practicing something in C language (I'm a beginner), but I'm now stuck on this program:
#include <stdio.h>
#include <string.h>
int main(){
int numbers[12] = {2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37};
int i;
int *point;
point = numbers;
while(i){
printf("Write number in ranging 1 - 40: \n");
scanf("%d", &numbers);
if (numbers, point){
printf("Your number is prime number.\n");
}
else if ((numbers <= 0) || (numbers >= 41)){
printf("Only numbers: 1 - 40.\n");
}
else{
printf("Try again.\n");
}
i;
}
return 0;
}
When I want to compile it, I just get this error message:
test.c: In function ‘main’:
test.c:19:38: warning: comparison between pointer and integer [enabled by default]
I looked around Stack Overflow, but I found nothing of similar topic and didn't help me.