Home > Back-end >  It is I, still ask basic questions
It is I, still ask basic questions

Time:09-25

Ask why circulation method results lose not to come out? Thank you very much
Code:
# include
# include
Int change (int x) {
If (x<=8)
Return the x;
The else
Return x % 8 + 10 * change (x/8);
}
Void turn (int x) {
Int t=0, len=0, I;
Char c [50]={0};
While (x!=0) {
[I]=8 + x % c '0'.
X=x/8;
i++;
}
Len=strlen (c);
for(i=0; i<=len/2; I++) {
T=c [I];
[I] c=c [-i len - 1];
C [len - 1 - I]=t;
}
Printf (" circulation method results: % s \ n ", c);
}
Int main () {
int x;
Char c [50]={0};
The scanf (" % d ", & amp; X);
Change (x);
Printf (" recursive method results: % d \ n ", change (x));
Turn (x);
Return 0;
}

CodePudding user response:

I not initialized

CodePudding user response:

reference 1/f, 5250 response:
I uninitialized

Oh oh oh, I'm silly, see, thank you

CodePudding user response:

, forming a habit, and character classes with function strcpy, strncpy, STRCMP such assignment
  • Related