I have a problem and I do not know how to solve it because I'm starting to use Dev-C ++ now. I do not know much about it, the problem is the following I was able to solve a bug I was having, which was the use of %
. Now I have another problem: any number that I type will appear on the screen that is even. Could someone please let me know in what line I was wrong and the mistake I made?
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
int main ()
{
int N;
printf ("Digite um numero: ");
scanf("%f", &N);
if (N<0)
printf ("Este número não é positivo\n");
if(N % 2 == 0)
printf ("Este numero e par\n");
else
printf("Este número é impar");
system ("PAUSE");
}