#include <stdio.h>
int main()
{
int num;
printf("Enter any number: ");
scanf("%d", &num);
//if(!(num % 2) && !(num % 9))
if((num % 2 == 0) && (num % 9 == 0))
{
printf("Number is divisible by 2 and 9");
}
else
{
printf("Number is not divisible by 2 and 9");
}
return 0;
}
//Enter any number: 18
//Number is divisible by 2 and 9
No comments:
Post a Comment