logo CodeStepByStep logo

is_multiple

Language/Type: C parameters boolean return
Author: Mariana Stepp (on 2019/10/23)

Write a function named is_multiple that accepts two non-negative int parameters a and b, and returns 1 (indicating "true") if a is a multiple of b, and 0 (indicating "false") otherwise. For example, the call of is_multiple(15, 5) would return 1 because 15 = 5 * 3. You may assume that a and b are non-negative integers and that b is not 0.

Function: Write a C function as described, not a complete program.

You must log in before you can solve this problem.

Log In

Need help?

Stuck on an exercise? Contact your TA or instructor.

If something seems wrong with our site, please

Is there a problem? Contact us.