-2
I made an algorithm to determine if a number is prime or not, but when compiling it is giving this error when compiling in Ubuntu’s own terminal.
#include <stdio.h>
int main(){
int n, i, divisivel;
 printf("Digite um numero para saber se eh primo: \n");
 scanf("%i", &n);
for(i = n, i >= 0, i--){
            if (n%i == 0){
            divisivel =divisivel + 1;
        }
}
 if(divisivel <=2){
        printf("o numero %i eh primo!: \n", n);
 }else{
    printf("o numero %i não eh primo \n", n);
}
return (0);
}
No for, instead of comma
,, change by semicolon;– gmsantos