# Pset1 Credit - Why is my code bypassing the Floor function inside If statement?

Here's my code-

``````
int f_1 = floor(N / 1000000000000000);
int f_2 = floor(N / 1000000000000);
int f_3 = floor(N / 100000000000000);
int f_4 = floor(N / 10000000000000);

if (moddigitsum_total != 0)
{
printf("INVALID\n");
}

else if (moddigitsum_total == 0)
{
if ((countdigit == 13 || countdigit == 16) && ((f_1 == 4) || (f_2== 4)))
{
printf("VISA\n");

}

if ((countdigit == 16) && ( (f_3 == 51) || (f_3 == 52) || (f_3 == 53) || (f_3 == 54) || (f_3 == 55)))
{
printf("MASTERCARD\n");

}

if ((countdigit == 15) && ((f_4 ==  34) || (f_4 == 37)))
{
printf("AMEX\n");

}

else if((countdigit != 13 && countdigit != 16 && countdigit != 15) && ((f_1 != 4) && (f_2 != 4) && (f_3 != 51) && (f_3 != 52) && (f_3 != 53) && (f_3 != 54) && (f_3 != 55) && (f_4 == 34) && (f_4 != 37)) )
{
printf("INVALID\n");
}

}

``````

I found this error when 2 numbers starting with 56 & 36 were yielding Mastercard & Amex respectively while the output should have been INVALID. Why is it happening? Am I using wrong operators inside if statement? or is my grouping of booleen ecpressions wrong?