Note that your condition for a fraction to be improper is only accurate numerador >= denominador and to be apparent this same condition must be verified beyond the condition numerador % denominado == 0, but the first condition is already analyzed in the else if above. then the code enters the first else if. To correct change the order of the checks, first check if it is apparent and then if it is improper
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
int main()
{
int numerador;
printf("Digite o numerador da fracao: ");
scanf("%d",& numerador);
int denominador;
printf("Digite o denominador da fracao: ");
scanf("%d",& denominador);
if(numerador < denominador){
printf("\n A fração é propria");
}
else if(numerador >= denominador && numerador % denominador == 0){
printf("\n A fração é aparente");
}
else if(numerador >= denominador){
printf("\n A fração é imppropria");
}
return 0;
}
Your code gets stuck in
numerador >= denominador. If this is true then it goes into that if. I suggest you check first if it is apparent and at lastelse ifascertain whether it is improper– Bernardo Lopes