Toggle navigation
Courses
Questions
Tags
Users
AC字串練習 輸入一個字串再讓其相反輸出
2
like
0
dislike
1.5k
views
請撰寫一個程式,其程式讓使用者輸入一個字串,再讓使用者輸入的字串從尾到頭相反輸出。
範例輸入1 abcde
範例輸出1 edcba
範例輸入2 abcde12345
範例輸出2 54321edcba
[Normal]
Coding (C)
-
asked
Dec 21, 2016
in
2016-1 程式設計(一)AC
ID: 19745 -
Available when:
Unlimited
-
Due to:
Unlimited
reshown
Jan 5, 2017
by
Shun-Po
|
1.5k
views
comment
Please
log in
or
register
to add a comment.
14
Answers
0
like
0
dislike
Hidden content!
* ** ** * * **
** *** **** **
int ** *
{
** *
* *** ******* * **** * **** **
for (i = 9;i * * * 0;i --) * * * *** * * **
** 0;
}
answered
Jan 5, 2017
by
410523022
(
-276
points)
ask related question
comment
Please
log in
or
register
to add a comment.
0
like
0
dislike
Hidden content!
** ** * * * **
* ** * * *
** *** *
{
* * *
* (i = 0;i * * 5;i ++) * ** * * **** * * *
(i = 4;i *** ** * ****** *** * ***** ** *
** 0;
}
answered
Jan 5, 2017
by
410523022
(
-276
points)
ask related question
comment
Please
log in
or
register
to add a comment.
0
like
0
dislike
Hidden content!
******* * * ** ******
* *** ** * *
int main()
{
* * *** * ** *** ** ** a[100];
** **** ** * * * temp;
** * * *** i,l;
* * *** * * *** ** **
* ** *** ***** *** * *
** * ** * *** *** *** * * ***
** * * ** * **
** *** ***** * * ******** temp=a[i];
* * * * ** ** ** *
*** **** ** * ** * ***** * **
* * ** ** ** * *
* * * ** * *** * ***** ***** ****** *
** **** *** ** * *
*** * ** ** ** 0;
}
answered
Jan 5, 2017
by
410523012
(
-158
points)
ask related question
comment
Please
log in
or
register
to add a comment.
0
like
0
dislike
Hidden content!
**** **** ***
** **** * * * ** *
******** ** *
********* *** *
int main (void)
{
* * ** *** * * * ** * * a,b,c,d,i,k,j;
** ** **** *** * *** * s[99],x[99],z[a-1];
** ** * * * ** **** ** **** * ("%s",s);
* * * ** ** *** ** * * ** **
* ** * * * *
** * ** *** * * * (i=a-1;i>=0;i--)
**** ** ***** **** *** * *** *
** * * ** * * * *****
*** * ** * *** * ** *** (k=0;k<a;k++)
* ** * ***** * *** ******* * * *
**** * * ** * * * ***
*** ** *** * *
* ** * * * * **** * ** ** ("%s\n",x);
* * * *** * * * * * * ** *** ** * **
** * *** * * ***** **** ** * ** * **
* *** * ** * * ("%s",s);
* ** ** * * * ** * 0;
}
answered
Jan 5, 2017
by
410523016
(
-136
points)
ask related question
comment
Please
log in
or
register
to add a comment.
0
like
0
dislike
Hidden content!
*** * * ***
**** * * * *** *
** * ***** * **
*** ******** *
int main (void)
{
* ** * ** ** * * **** a,b,c,d,i,k,j;
**** ****** * * *** * s[99],x[99],z[a-1];
* * * * * * * ** ("%s",s);
** ** *** * * * * **
* *** ** ** * * * * * *
* * ***** * * * *** (i=a-1;i>=0;i--)
* *** * ** ** * **** ** *
** ***** * ** ** ***
* * * ** ** * * * * ** ** (k=0;k<a;k++)
* ** ** ** ***** ** * ***
*** *** * ** ****** * **
*** ** ***** * * **
***** ***** * * * *** (" %s\n",x);
** * ** * ****** * *** * * * * *** **** *
*** * *** ** ***** **** *** * * ** * * * **
* * * ** * ** ** ** * * ("%s",s);
**** **** ** ** * **** * 0;
}
answered
Jan 5, 2017
by
410523016
(
-136
points)
ask related question
comment
Please
log in
or
register
to add a comment.
0
like
0
dislike
Hidden content!
* * * * * ***
* * ** * * *** * *
** ** ***** * * **
*** **** **
int main (void)
{
* *** * *** * * * * a,b,c,d,i,k,j;
* * * * * * * ** s[99],x[99],z[a-1];
* * * **** ** * **** * *** * * ***
**** ** * * ** * *** ** ****
** *** * *** *** * ** **
* ** * * ** ** * (i=a-1;i>=0;i--)
*** ** *** * * * *** **** *** *
* * * ** ***** ** **
* ** * ** ** * ** ** * (k=0;k<a;k++)
** *** ***** *** * *****
*** **** * **** **** * * * *
** ** * *** ** **
* **** * * ** * ** ******** * ** ** *
** ****** ** * *** * * ***** * ***
* ** * ** * * * * * * ** * * *** *
//printf * * * * * * * **
return 0;
}
answered
Jan 5, 2017
by
410523016
(
-136
points)
ask related question
comment
Please
log in
or
register
to add a comment.
0
like
0
dislike
Hidden content!
#include ** * ** **
#include **** ** **
void reverse(char str[]);
int length(char str[]);
int main(int argc, char *argv[]) {
** ** * * ** * *** ** ***** str[100];
** * * * *** ** ** * ** **
* * * *** * ***** **** * *
* * * * * * * ** *** * * *
*** ** ** ** * ** ** * * 0;
}
void ** * * str[]){
* * * * * * * * *** **** ** *
** * * ** ** * ** ** ch;
* * *** ** ** ** * i = 0; i < l/2; i++ ){
** * * * ** * * *** * * * ***** ** ** = str[i];
*** * ** ** ** * ** ** ** ** *** ** ** ***** *** = str[l-i-1];
** * * ************ * * * *** ***** * * *** * = ch;
** * ** * * *
}
int length(char str[]){
* ****** **** ** ** * ** ** ** i=0,cnt=0;
**** * * * * ***** * * * * * ** ***** *
* * * **** ******* * **** ** **** * **
* * * * **** ** * * ** * *
* ****** * ** *** * * * * * ** cnt;
}
answered
Jan 5, 2017
by
s31102
(
-100
points)
ask related question
comment
Please
log in
or
register
to add a comment.
0
like
0
dislike
Hidden content!
** * * * * * ** *
** * ** **** *
int main(void)
{
** ****** * * s[100];
** *** ** ***** *** tmp;
** * * ***** i,k;
* * **** * ** * * ***
**** * ** * *** *** * *
* * **** * ** ** ** * ** * ** *
** *** ** * *** *
***** ** * * * ***** ** ** tmp=s[i];
* * * *** * ** * * * ** ** * *** ** **
** * * *** ** ** * * *** s[k-i-1]=tmp;
* ***** ** *
* * *** * * * *** * * *
* *** * ** ********** 0;
}
answered
Jan 4, 2017
by
410523034
(
-120
points)
ask related question
comment
Please
log in
or
register
to add a comment.
0
like
0
dislike
Hidden content!
#include <stdio.h>
#include * ** **
#include <string.h>
int main()
{
* *** * * * * *** s[100];
**** * **** ** ** * * l,i;
* *** * ** ** * * * * * * **** *** * *
** *** * *** * * * = strlen(s);
** * * ** ** ** ** *******
** * ** * ** ** ***
* * * * *** * * * ** ** * * * ** ** * ** ** * *** * **
* ** * ** *
** * * **** * * * * * ** 0;
}
answered
Jan 3, 2017
by
410323020
(
-85
points)
ask related question
comment
Please
log in
or
register
to add a comment.
0
like
0
dislike
Hidden content!
#include<stdio.h>
#include<stdlib.h>
#include<string.h>
#include <ctype.h>
int main(void)
{
*** * ***** ** * ***** i;
* * *** * ** * *** ***** * * len;
** ** *** ***** ****** * ** s[100];
* ** *** ***** * *** * c;
** ***** * * ** ****
* * * * ** ** * ** * ***
** ** * * * * * * * * *******
* * * ** * *** * * * ** * * ***
*** * * ** ***** * * *** * **** ***** **
* * ** * ** ** ** * *** ***** * * ***** ***** ***** *
* * * ** ** * ** ** **** ** **** * * ** * * * *
** * ** * ** ****** * * * * * *
* * *** *** * ** ** * ***
}
answered
Jan 3, 2017
by
410425016
(
-124
points)
ask related question
comment
Please
log in
or
register
to add a comment.
Page:
1
2
next »
Welcome to Peer-Interaction Programming Learning System (PIPLS) LTLab, National DongHwa University
English
中文
Tiếng Việt
IP:172.69.58.91
©2016-2025
Related questions
0
like
0
dislike
3
answers
AC字串練習-製作一個編碼器
[Normal]
Coding (C)
-
asked
Jan 3, 2017
in
2016-1 程式設計(一)AC
by
410425014
(
-162
points)
ID: 20514 -
Available when:
Unlimited
-
Due to:
Unlimited
|
606
views
0
like
0
dislike
3
answers
AC字串練習 設定一組密碼
[Normal]
Coding (C)
-
asked
Jan 5, 2017
in
2016-1 程式設計(一)AC
ID: 20997 -
Available when:
Unlimited
-
Due to:
Unlimited
|
613
views
12,783
questions
183,442
answers
172,219
comments
4,824
users