Don't know why 345555 passes through, it is certainly divisible by 5. Compiler bug perhaps? What compiler are you using?
Did you try printing the number entered back on screen to check the variable contains the expected value?
Paste the following function into your code, call it, and let me know what the output was:
Code:
void go4e_43398()
{
	int num[7]={3,7,15,20,345555,36,40};
	for (int i=0; i<7; i++)
	{
		if (num[i]%5==0 || num[i]%2==0)
			printf("%d is divisible by 2 or 5\n",num[i]);
	}
	printf("sizeof int=%d\n",sizeof(int));
}
Obviously this shouldn't say anything for 3 or 7, but the rest should print "is divisible by 2 or 5".