{
If (n==1)
return 1;
The else
Return the sum (n - 1) + n.
}
Will change for n - and - n - 1 n the result is not the same, n assignment 3, for example, use the above code to get a value of 6, n - would be an error, -- -- -- n got 4. I know n - first, after using - n first after damping but why the debug, n - shrimp every n in return for 3? Why is the return of the expression of n n results not as is called?
CodePudding user response:
Brush, I wrote more than ten years of c + + code, didn't understand,Don't write such code in practical work,
CodePudding user response: