-1
I have a problem and I don’t know how to solve it because I’m starting to use Dev-C++ now. I don’t know much about him, the problem is the following I managed to solve an error I was having, which was the use of %
. Now I have another problem: any number I type will appear on the screen that is even. Could someone please let me know on what line I made a mistake 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");
}