From 359f72d06198c370b6392a3e150d35fec1e75242 Mon Sep 17 00:00:00 2001 From: xtaodada Date: Thu, 31 Mar 2022 21:31:52 -0400 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20'ex3=5F1.c'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ex3_1.c | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/ex3_1.c b/ex3_1.c index e39b287..c8e6d24 100644 --- a/ex3_1.c +++ b/ex3_1.c @@ -152,23 +152,25 @@ void Base(SqStackChar *L, int n, int e){ } printf("\n\n"); } -void Palindrome(SqStackChar *L, int e){ - int i=1,n=e; - char temp,temp1; +void Palindrome(SqStackChar *L, char e[]){ + int i=1,len=strlen(e),k; + char temp; // 转换 - while(n){ - PushChar(L, NumToChar(n%10)); // 进栈 - n/=10; + for(int j=0; j