Answer:
See the explanation
Step-by-step explanation:
Given to integers a,b we can find integers k,r such that a = kb +r, where r is called the residue, where |r|<|b|. When r = 0, we say that a is a multiple of b. Based on that, we define the function %(a,b) which gives out the residue between a,b. For example %(4,3) =1 since 4 = 1*3 +1.
The main idea of the program should be: if the residue is 0, then they are multiples and it should return 1, otherwise, return 0.
Let us use the following syntaxis function name (parameter 1, parameter 2).
So, we have
isMultiple(a,b) {
if %(a,b)=0 (this means they are multiples)
then return 1
else return 0
end
}