When I try to compile it gives me this and I really don't know how to solve this problem.
#include <stdio.h>
int main()
{
float num;
printf("Insert a number: \n");
scanf("%f", &num);
if (num>0){
printf("%f is positive", num);
}
else (num<0){ //The error is here
printf("%f is negative", num);
}
}
Aucun commentaire:
Enregistrer un commentaire