Such as number of each topic will achieve 10 to 19 by ten interchangeably, but I can't change 10 to 01... C language for beginners who give advice or comments!!!!!!
CodePudding user response:
Int x, a, b, c;
The scanf (" % d ", & amp; X);
A=x % 10;//take bits
B=10 x/10%;//take 10
C=x/100;//more than 10
X=c * 100 + 10 * a + b;//exchange/10
Printf (" % d \ n ", x);
return 0;
CodePudding user response:
reference 1/f, one wipe dust response: int x, a, b, c; The scanf (" % d ", & amp; X); A=x % 10;//take bits B=10 x/10%;//take 10 C=x/100;//more than 10 X=c * 100 + 10 * a + b;//exchange/10 Printf (" % d \ n ", x); return 0; Thank you, but not my homework requirements?? CodePudding user response:
02 % d Round up six words CodePudding user response:
refer to the second floor qq_45904094 response: Quote: refer to 1st floor one wipe dust response: int x, a, b, c; The scanf (" % d ", & amp; X); A=x % 10;//take bits B=10 x/10%;//take 10 C=x/100;//more than 10 X=c * 100 + 10 * a + b;//exchange/10 Printf (" % d \ n ", x); return 0; Thank you, but my job requires that not so? Give you a way of thinking, the rest is simple, can do int x,y; Y=(x %) 10 * 10 + (int) (x/10); The return of y; CodePudding user response:
This exchange may have problems, you can define a block, intermediate variable is used to exchange CodePudding user response:
reference 5 floor one wipe dust reply: Quote: refer to the second floor qq_45904094 response: Quote: refer to 1st floor one wipe dust response: int x, a, b, c; The scanf (" % d ", & amp; X); A=x % 10;//take bits B=10 x/10%;//take 10 C=x/100;//more than 10 X=c * 100 + 10 * a + b;//exchange/10 Printf (" % d \ n ", x); return 0; Thank you, but my job requires that not so? Give you a way of thinking, the rest is simple, can do int x,y; Y=(x %) 10 * 10 + (int) (x/10); The return of y; Ok, thank you!!!!!!!!!!!! CodePudding user response:
,,, the title is with the cords of the macro, CodePudding user response:
this is a nice nickname reference 4 floor response: % 02 dRound up six words Thank you take it out of me CodePudding user response:
refer to 6th floor SuperDay response: this exchange may have problems, you can define a block, a intermediate variable is used to exchange just learning c language I don't understand completely CodePudding user response:
refer to the eighth floor wowpH response: ,,, the title is with the cords of macro, Yes, I used the macro ah, just behind the execution time is a little small problems CodePudding user response:
I hope it can help you: https://blog.csdn.net/it_xiangqiang/category_10581430.html I hope it can help you: https://blog.csdn.net/it_xiangqiang/category_10768339.html