Home > Back-end >  C programming
C programming

Time:10-14

Answer:
Dong zhong input, judge this day is this year how many days, if a leap year and 3 month input is greater than the need to consider one more day

CodePudding user response:

Change: Y<=7

CodePudding user response:

Variables can be saved if optimizing code

CodePudding user response:

Don't reference code # 1
Bad code style.
Some programmers like to pursue readable code logic might be repetitive understand simple
Some programmers like to pursue code concise understanding need to spend bit of idea on simple direct
tasks assignedAnd the code of # 1 is much
Couldn't be more than bad readability concise
This is unreadable and repetitive practice is really rare
Dodged two code style integrated the advantages of the two kinds of style shortcomings

Such as expression for leap years
A. & amp; & (b | | c) evaluation result is 1 or 0
Direct run=a & amp; & (b) | | c) just a matter of
The practice of # 1 is repetitive
Also is three orders, convert the result of 1 or 0 to 1 or 0??
If the three orders, is for the sake of readability must not sacrifice
So the next line directly into the readability is gray

Tian, by the way this variable from beginning to end have no value

CodePudding user response:

CodePudding user response:

https://blog.csdn.net/xianfajushi/article/details/103925143
  • Related