kappa_am
Full Member level 6
- Joined
- Jul 16, 2012
- Messages
- 331
- Helped
- 19
- Reputation
- 38
- Reaction score
- 19
- Trophy points
- 1,298
- Location
- Vancouver
- Activity points
- 3,859
I am trying to understand a program that is written by C. unfortunately I am not able to under stand these three statements in "while" and IF condition. I will be grateful if someone explain these to me.
what are the meaning of:
binom = choose(n, ++c)) <= e
e == 0 || (binom = choose(n - 1, c - 1)) > e
--n && c && ((b <<= 1) || 1)
what are the meaning of:
binom = choose(n, ++c)) <= e
e == 0 || (binom = choose(n - 1, c - 1)) > e
--n && c && ((b <<= 1) || 1)
Code C - [expand] 1 2 3 4 5 6 7 8 9 10 11 do { e -= binom; } while ((binom = choose(n, ++c)) <= e); do { if (e == 0 || (binom = choose(n - 1, c - 1)) > e) c--, b |= 1; else e -= binom; } while (--n && c && ((b <<= 1) || 1));
Last edited: