What is the purpose of the div() library function?

后端 未结 5 2142
一个人的身影
一个人的身影 2020-11-28 16:46

When C has the / operator to divide two numbers, what is the purpose of having the div() library function?

Is there any scenario where /

5条回答
  •  -上瘾入骨i
    2020-11-28 16:54

    div() returns the result of the division and the remainder. So you don't have to use % operator to find the remainder.

提交回复
热议问题