How to solve this question!

Can someone explain me with the help of an example

In this problem, let us assume that Number of animals in zoo is X.

Then, as per statement, F is a factor of X and M is a multiple of X.

From above two statements, we can conclude that F is a factor of M.

Just check if M%F == 0, then correct, otherwise wrong.

1 Like

As we don’t know how many no of animals in the zoo

just assume Total no of Animals=X

Given that F is factor of Total No of animals in Zoo i.e X

And M is multiple of X, M and X are co-related

So, we can say that F is factor of M

i.e M%F==0, is correct else Wrong


int M,F,testcase

while(testcase !=0) //or (testcase)
print “Correct”
print “wrong”


1 Like