Total=num * PRICE;//total is equal to the num is multiplied by the PRICE// So please comment on it, the wrong words, please correct explanation: thank you
CodePudding user response:
On a post already married
CodePudding user response:
So to write, but it is not necessary to add//in the back, I guess you want to write this? Xi xi xi xi/* */isn't it?
CodePudding user response:
Don't comment What, How To annotate according to
CodePudding user response:
total=num * PRICE;//sum total number num=* unit PRICE PRICE
CodePudding user response:
Such statements do not suggest to add a comment, add comments should not add such comments, because a look will know that is the meaning, can be added to calculate total price (detail again, according to the actual demand to see what the total price is the total price, such as corn price, etc.) If it is the C language annotation is not recommended to add operation, others see would be counterproductive, because looked at bloated comments much code,
Annotation is not want to add, can not add comments don't add comments, add comments to explain function, rather than what the statement is the C language;
Without annotation, see code of the people don't know what to do, it's from other aspects, such as the name of naming, want to see a knowledge meaning, etc.