0 like 0 dislike
960 views
 

請設計一個程式,使用者會輸入一個字串,請判斷該字串是否為回文(palindrome)。

 

輸入範例1:

12321

輸出範例1:

12321 is a palindrome

輸入範例2:

apple

輸出範例2:

apple is not a palindrome

[Normal] Coding (C) - asked in 2016-1 程式設計(一)AC
ID: 20482 - Available when: Unlimited - Due to: Unlimited

reshown by | 960 views
0 0
Called for Help

31 Answers

0 like 0 dislike
Hidden content!
* * * * ** * *
** **** **
* ** * * **** ** *

#include * ***** *

int *

{
* **** int i,len;
* ** **** ** char s[100];
** *   gets(s);
*** ** * **** * *
* * * ** * * * ** * ** ***
* * *** {
** * * * ** *** **   if(s[i] != * **
*     * {
* * *** ** ** ** ***** * * ** ** * * * *** *** ** ***** *
* * **** ********* ***** * ** ** * ** * **
* * * * * ** * ** } * * ** * * *** ** *
** * * }
*******   if ***** ** * *
*** ** * * ** * * ****

}
answered by (-124 points)
Welcome to Peer-Interaction Programming Learning System (PIPLS) LTLab, National DongHwa University
English 中文 Tiếng Việt
IP:172.70.178.181
©2016-2024

Related questions

0 like 0 dislike
7 answers
[Normal] Coding (C) - asked Jan 5, 2017 in 2016-1 程式設計(一)AC by 林佳慧 (-85 points)
ID: 20976 - Available when: Unlimited - Due to: Unlimited
| 270 views
0 like 0 dislike
24 answers
asked Dec 7, 2016 in 2016-1 程式設計(一)AC by Shun-Po (18k points) | 566 views
0 like 0 dislike
3 answers
[Normal] Coding (C) - asked Jan 5, 2017 in 2016-1 程式設計(一)AC
ID: 20997 - Available when: Unlimited - Due to: Unlimited
| 193 views
0 like 0 dislike
3 answers
[Normal] Coding (C) - asked Jan 3, 2017 in 2016-1 程式設計(一)AC by 410425014 (-162 points)
ID: 20514 - Available when: Unlimited - Due to: Unlimited
| 213 views
0 like 0 dislike
5 answers
[Normal] Coding (C) - asked Dec 27, 2016 in 2016-1 程式設計(一)AC by 410342026 (-105 points)
ID: 20135 - Available when: Unlimited - Due to: Unlimited
| 288 views
12,783 questions
183,443 answers
172,219 comments
4,824 users