Toggle navigation
Courses
Questions
Tags
Users
AC 字串練習題 判斷字串長度
0
like
0
dislike
736
views
請設計一個程式,試計算輸入字串的長度。
input:
Hello, how are you?
output:
19
[Normal]
Coding (C)
-
asked
Jan 5, 2017
in
2016-1 程式設計(一)AC
by
林佳慧
(
-85
points)
ID: 20976 -
Available when:
Unlimited
-
Due to:
Unlimited
reshown
Jan 5, 2017
by
Shun-Po
|
736
views
comment
Please
log in
or
register
to add a comment.
7
Answers
0
like
0
dislike
Best answer
Hidden content!
*** * * * ***** *
** * **** * * *
int main()
{
** *** * ** *
* ***** *
** ** *** * * **** * *** );
** * * 0;
}
answered
Jan 5, 2017
by
林佳慧
(
-85
points)
selected
Jan 5, 2017
by
林佳慧
ask related question
comment
Please
log in
or
register
to add a comment.
0
like
0
dislike
Hidden content!
#include <stdio.h>
#define MAXLEN 10000
int getStr(char line[], int nmax);
int main(void){
** *** * ** ** ** * ** strLen;
** *** * * * * ** *** buffer[MAXLEN+1];
* * * **** ** ****** **** ** **
** *** * ** ****** ** * *** ** * *** * * * * = getStr(buffer, MAXLEN);
* * * ***** * * ** **** ** ** * * * ** ** (strLen==0)
* * *** ****** * *** ** * ** * * *** * * * * * ** ** *
* ** ***** *** ** * ***** * ** ***** * * * ** * * * **
* *** * ** ** * * ** **** * *
}
int getStr(char *buffer, int maxLen){
* **** * ** ** * ****** * c;
* * ****** ** * * *** * len = 0;
* ** * ** ** * ** * (c=getchar()) != '\n' ){
* * * * * * ** * ** * * * * * * *** * **
* * * *** *** *** *** ***** ** * ** ***** **** * ** * ** * *** ** **
* ** * ** *** * ***** **** ****** * * ** ** * *****
* ** * *** ** ******** *** ** * ** *** *
}
* *** * *** * ** ** * **** * ** **
** ***** *** *** ******* * * **
** * * *** ***** * * ** len;
}
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 ** *
** *** * ** ** i = 0,k = 0,a = 0;
* *** *** * * *** *** != '\n'){
* * *** * * ** = *** * *
* ** * ++;
* ** * * ******** **
* * *** ** * * * ** ** *** ** * * * k-1);
* * 0;
}
answered
Jan 5, 2017
by
Doloa
(
-122
points)
ask related question
comment
Please
log in
or
register
to add a comment.
0
like
0
dislike
Hidden content!
#include * ** *****
#include ** * ** * **
int ** **
* ** ** * ****** ** a[5000];
* ** ** ***** i = 0;
** ** ** * ***** ** * *
* ** ** ** *** * * ** *** *** * *
** ** * * 0;
}
answered
Jan 5, 2017
by
Doloa
(
-122
points)
ask related question
comment
Please
log in
or
register
to add a comment.
0
like
0
dislike
Hidden content!
* **** * ** *
** ** * * * ******
**** **** * *
* ** ****** *
int main()
{
* *** ** * * * ** a[500];
* * *** ** ** * * * * *** * **
* *** *** *** * * ** * ***** ** * * * * ;
* ** *** * **** * ** ****** 0;
}
answered
Jan 5, 2017
by
Jim870729
(
-102
points)
ask related question
comment
Please
log in
or
register
to add a comment.
0
like
0
dislike
Hidden content!
** * * * *
* * ** ** *** * ** * *
**** * * ** *
* ** * ** **** *
**** ** * * * ** **
int *** *** *
{
* * *** * char s[1000];
* ** * gets(s);
* ** * ** * ***** * * * ** *
* ***** ** * return 0;
}
answered
Jan 5, 2017
by
410523007
(
-157
points)
ask related question
comment
Please
log in
or
register
to add a comment.
0
like
0
dislike
Hidden content!
* * ** ** * **
** **** * ****
* * ** *******
* * ** *
** * ******
int ** ** * ** **
{
* ** **** char s[1000];
* *** * ** gets(s);
**** * ** * * * ** * *****
* * * * * return 0;
}
answered
Jan 5, 2017
by
410523007
(
-157
points)
ask related question
comment
Please
log in
or
register
to add a comment.
Welcome to Peer-Interaction Programming Learning System (PIPLS) LTLab, National DongHwa University
English
中文
Tiếng Việt
IP:172.70.100.173
©2016-2025
Related questions
0
like
0
dislike
31
answers
AC 字串練習題 判斷回文
[Normal]
Coding (C)
-
asked
Jan 3, 2017
in
2016-1 程式設計(一)AC
ID: 20482 -
Available when:
Unlimited
-
Due to:
Unlimited
|
2.5k
views
0
like
0
dislike
24
answers
AC 字串 練習題 搜尋
asked
Dec 7, 2016
in
2016-1 程式設計(一)AC
by
Shun-Po
(
18k
points)
|
1.8k
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
|
556
views
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
|
548
views
0
like
0
dislike
5
answers
AC 字串練習 身份證字號驗證
[Normal]
Coding (C)
-
asked
Dec 27, 2016
in
2016-1 程式設計(一)AC
by
410342026
(
-105
points)
ID: 20135 -
Available when:
Unlimited
-
Due to:
Unlimited
|
887
views
12,783
questions
183,442
answers
172,219
comments
4,824
users