Home > Back-end > Pray god taught how to change this?
Pray god taught how to change this?
Time:09-18
Supplement: modify the source code format, make it accord with "Google c + + style guide" # include # define N 8 main () {int a [N], I, thismax, maxsum; for(i=0; i for(i=0; i Maxsum) maxsum=thismax; The else maxsum=maxsum; }}
CodePudding user response:
What the hell is the Google c + + style guide? Don't bird it,
CodePudding user response:
The code clear, format specification, good readability,
CodePudding user response:
The most common style is like this:
#include
8 # define N
Int main () { Int a [N], I, thismax=0, maxsum=0;
for(i=0; i for(i=0; i { Thismax=thismax + a, [I]. If (thismax & lt; 0) { Thismax=a [I + 1); i=i + 1; } The else If (thismax & gt; Maxsum) maxsum=thismax; //else maxsum=maxsum;//this useless }