Time:09-17
CodePudding user response:
with a stack memory bits, ten, hundred figures, etc., to reverse the output,
Quote: refer to 1st floor ooolinux response: with a stack memory bits, ten, hundred figures, etc., to reverse the output, How to write the program
Quote: refer to 1st floor ooolinux response: With a stack memory bits, ten, hundred figures, etc., to reverse the output, Too much trouble, as long as the transformed into string, calculate the length of the string, and
With a stack memory bits, ten, hundred figures, etc., to reverse the output,
Quote: refer to the second floor qq_44217037 response: Quote: refer to 1st floor ooolinux response: with a stack memory bits, ten, hundred figures, etc., to reverse the output, How to write the program Simple point you can use an array instead of the stack, the first program to write their own ~
use a for loop, then define a n, n is the number of a for loop, until the positive integer 0 can jump out of the loop, output n
#include Int main () {Long long x; Int n=0; Printf (" enter a number: "); If (the scanf (" % LLD, & amp; X)!=1) puts (" bad input "); The else {Printf (" % LLD is ", x!=0? X: (x=1, 0)); While (x)/x=10, n++; Printf (" % d a number digit % s \ n ", n, n==1? "" :" s "); } return 0; }
Page link:https//www.codepudding.com/Backend/6738.html