How do equations in bools like this determine if it's true or false, and also after it does the first x*=1, how does it know whether to go onto the else or not?
Usually I've seen codes like... if(something is true)>> if not do this. This code, how do I tell if the x*=i is true or false?
If i is a 0, then i is false, but if it equals 1 or more, it's true. So, with line 1, if i is true, then x will equal x plus x times i, otherwise, x will equal x plus 1. It's easier to understand the logic, if each command is on a separate line.