wes d2a2ba9e15 first commit | 4 jaren geleden | |
---|---|---|
.. | ||
README.md | 4 jaren geleden | |
code.cpp | 4 jaren geleden | |
unitTest.cpp | 4 jaren geleden |
by Helen Yu tags: math, numbers
There is a single operator in C++, capable of providing the remainder of a division operation. Two numbers are passed as parameters. The first parameter divided by the second parameter will have a remainder, possibly zero. Return that value. Examples remainder(1, 3) ➞ 1 remainder(3, 4) ➞ 3 remainder(-9, 45) ➞ -9 remainder(5, 5) ➞ 0 Notes The tests only us
There is a single operator in C++, capable of providing the remainder of a division operation. Two numbers are passed as parameters. The first parameter divided by the second parameter will have a remainder, possibly zero. Return that value.
remainder(1, 3) ➞ 1
remainder(3, 4) ➞ 3
remainder(-9, 45) ➞ -9
remainder(5, 5) ➞ 0
return
the result.