How does return work here?

前端 未结 5 585
野性不改
野性不改 2021-01-27 06:25

new question: but why the expression from n == number, from firstFactorPtr == factor1 ?

Can somebody explain me, how this works:

return ( factor ==

5条回答
  •  隐瞒了意图╮
    2021-01-27 06:53

    It returns the result of the Boolean expression "factor equals 1", i.e., true or false.

    This routine also has a side effect: it stores the found factorials in the lists pointed to by the two int * in the header.

    In essence, it returns true if the factor is a prime -- the loop counted down all the way to '1' --, false otherwise.

提交回复
热议问题