0 喜歡 0 不喜歡
13.1k 瀏覽
翻譯的工作有時候是依翻譯的字數來計價的,請設計一個程式計算一個句子中有幾個單字,在一個句子中被標點符號或是泛白字元隔開的可視為一個單子。

輸入說明:輸入會包含英文字母、數字以及標點符號,當程式遇到句點(.)時代表輸入結束。

輸出說明:請輸出一個整數代表輸 入的句子當中包含幾個單字。

輸入範例:

According to Josephus' account of the siege of Yodfat, he and his 40 soldiers were trapped in a cave by Roman soldiers.

輸出範例:

22
[練習] Coding (C) - 最新提問 分類:2016-1 程式設計(一)AC | 用戶: (18k 分)
ID: 18071 - 從幾時開始: 2016-12-01 18:30:00 - 到幾時結束: 2016-12-01 21:00:00

重新顯示 用戶: | 13.1k 瀏覽
0 0
Called for Help

86 個回答

0 喜歡 0 不喜歡
內容已隱藏
#include <stdio.h>

#include <stdlib.h>

#include <math.h>

#include <ctype.h>

int check1(char c)

{
** * ******* * *** * ***** i=0;
************** * ** * * **
**** * ** * * * ** **** * **** ** * ***
**** **** *** * * * * * ** * ** *** ** ****
* * *** * ** * * * * * *** * * ***
* * * *** * ** * * *** * i;

}



int check2(char c)

{
** ** **** * ** * j=0;
* * **** ** * * * * ** *** *
* **** * * * * ** ** ** ** * ** * *
* **** ** *** * * * ** ** *** ** * * **** * ** ** * **
* **** **** * ** * * * ****** **** * ** ***
** * **** *** * * ** * j;

}

int main()

{
* * * * **** ****** c;
** ***** * ** ** * * i=0,j=0;
* * *** * ** ** * *** * ******* * * * ** **

    
* * * * ** *** **** * c!='.')
* * * * * * * ****


* ****** * ***** * ** * * * * * * * *** * * **
* * **** ** *** * **** *** ****** * *** **
** ** * * * ** * ** *** * * *** * * * * * *
***** * * ** ** * *
** * ** * * * ** *** **** * * ***** * ** * *** ***** ******



return 0;

}
最新回答 用戶: (-248 分)
0 喜歡 0 不喜歡
內容已隱藏
** ***** **
* ***** * ** ****

int main (void)
***** *

char c;

int i = 0;

void ** ** c)

{
**

i++;
*** ***

i++;
**** * * * ** *
** ** * * * **** * ** **** ******
*** *** **** **** * ** ** 0;

}
*** ** ;

}
* ** ** ** * ****** * **
** ** ** ** ** ** ****** *
* *

}



}
最新回答 用戶: (-140 分)
0 喜歡 0 不喜歡
內容已隱藏
#include<stdio.h>

 

 void judge(char c[100])

 {
*** *** *** * * * a1=0,a2=0,a3=0,a4=0,in;
* * ** ***** *** *** * ******** && c[in];in++)

    {
* ** * * ** * * *** *** * ***** *** * *** (48<=c[in] && c[in]<=57)
**** ****** * ** ** ** * * ** * * ** ****** *
****** ** * * *** * *** * * ** ** ** * * ** ****** *** * *
* ** **** *** * * **** ** **** * *** *** * * ** ****
*** * * * ** *** *** * * * *** if(65<=c[in] && c[in]<=90)
* ** *** * ** *** * * * * * ****** * ** *** *** ***
********** * ******* ** ** ***** **** ** * * * **** *** ** * *** * *** * *
* *** * ** * * **** *** *** * * ** * * ****** * * ** *
* * **** *** ***** ***** * * * * ** if (97<=c[in] && c[in]<=122)
* *** *** ** * * * * **** ** ** *** * * ***
* ***** ** * * * ** * *** **** * * **** *** ** *** * ******* **
** * *** * ** ** * ** ******* ***
** ** ****** * *** * * *** * * * ** * ** ** if(39<=c[in] && c[in]<=46)
**** ** * * * ***** * * * ***
* **** * * *** ** * *** * * * * * ** **** **** ** ** * * * * *** * *
* **** *** * * **** * ** ** * * * ** ** * **** * * *
* * *** * * ******** * * * ******** * *** * ***
* ** ** * * ** ** *** *** ** ** ** *** **** **
*** * * * ** * * * **** ******* * *** *** * ** ********* * *** **
* * * * * * ** * * * **** * *** ** ** ***** * *
* ** **** ** * * **** * * ** *
* *** ** *** *** * ****** *** * * * * * ** ** ****

 }

 

 int main()

{
** ** ** *** * * * ** * c[100];
* * ***** *** ** * ****
*** *** * ** ***** * * * *

    
* **** ** * *** 0;

 }
最新回答 用戶: (-124 分)
0 喜歡 0 不喜歡
內容已隱藏
#include <stdio.h>

#include <stdlib.h>

#include <math.h>

#include <ctype.h>

int check1(char c)

{
** ** * *** *** * * * i=0;
* * * ** *** * ** * * **
* ** *** * * * * **** * * ** * *
* *** * ** *** *** * ** * ***** * **** *****
* *** * * * * ** *** * ** * **** *
***** **** ** ** * i;

}



int check2(char c)

{
* ** * ** ** * * * ** j=0;
** *** * * ** * * ** ** * ***
* * * * ** * ** ** *** * * **
** *** ** * ** * * ***** * * ***** * * * * * *
*** ** **** *** * ****** * *** ** *
* * * ** ***** ** * j;

}

int main()

{
* * ********* ** *** ** c;
* * ****** ** * * ***** *** i=0,j=0;
*** **** *** ***** * * * **** * ** * * * ***

    
* * *** * * * ***** *** * c!='.')
* * ** * **** * * **


* * * * *** * * * * * * * ** ****
** **** *** ****** * * *** * ** * * * * ** ** **
* * ** * *** * * ** *** ** * * * * * *** *** ** * ** ** ** * ** ****
*** * * * * **** ***
***** ** * * * * *** ***** * ** * * * * * * ** ** ****



return 0;

}
最新回答 用戶: (-248 分)
0 喜歡 0 不喜歡
內容已隱藏
#include <stdio.h>

#include <stdlib.h>

#include <math.h>

#include <ctype.h>

int check1(char c)

{
*** ** * ** **** * * **** * i=0;
** * ***** * ** * ***** **
*** * ***** *** * ** * ** ****
* * * ****** ** *** ** **** **** *** *
** **** * * * *** ******** * ** **
** * *** ** **** *** * ** * i;

}



int check2(char c)

{
* *** * *** * * * ** * j=0;
*** * *** *** * **** ** * **
* ** ** ****** * **** * ** * ** * * *
* * ** * * ** **** * * * * ** * ** * ** *
* * * * **** ** * *** * ***
**** ** * *** * ** * * * j;

}

int main()

{
* ** * ** * * * **** ** c;
* * * ** ** *** * * ** i=0,j=0;
** ** ** * ** ** *** ** * * **** * ** *** ***
* * **** * * *** ** *** to Josephus' account of the siege of Yodfat, he and his 40 soldiers were trapped in a cave by Roman soldiers.)
*** *** ** * * ** *
* *** *** * * **** * * ** *** ** ** *** * * * *
* ** * *** ** * * ***
*** * *** * * * ** * * **** c!='.')
** ** * ** * *** * ** *** *


****** **** * *** *** ** *** * *** ** * *** ** * * ** *
*** *** * ***** * *** ** * * * * * *** * *
* ** * **** *** *** * * **** **** * ** *********** ** *** *** * ** * *** **
* ** ** ** ** ****** **
* * **** ** ** ** ** * ** * ** * * *** * ** ** *



return 0;

}
最新回答 用戶: (-248 分)
0 喜歡 0 不喜歡
內容已隱藏
** * **** *** **
* ** ********* *****

int main *
* **** **

char c;

int i = 0;

void ** * ** c)

{
** *

* * **
*
** ** * *** * *
** *** ** * * **** ** 0;

}
* * * ;

}
* * * * * * * ** * * *
**

}
* * * ******* ** *
** 0;

}
最新回答 用戶: (-140 分)
0 喜歡 0 不喜歡
內容已隱藏
# include <stdio.h>

# include <ctype.h>



 int main()

 {
* * **** ** *** *** * * * c;


* * ** *** ** * ** *** * i = 0,b = 0;


* * **** ** ***** * * * * &c);
*** ** * ** * * * ** ** ** * c != '.')
*** * ** **** * **
*** *** * ** ** * *********** * * *** * * ** *






* **** ** * ** * * **** ** * ***** * *** += 1;


**** * * ********** * * * * * ** *** ********** ******* * * &c);
** * ** * * * *** *** ** ** * * *** ******
**** * * * **** * * *** ** * **** *** *


* ***** * ** ** **** **** * * * * i);


** ****** ** **** * ** * * 0;



}
最新回答 用戶: (-158 分)
0 喜歡 0 不喜歡
內容已隱藏
****** * ** *
** ** * * *** ***
main *
* *
*** c;

int i = 0;
* * * c)

{
***** * *
**
* * * *
*
*** ;

}
** * * * * * ** ***** * * ****
***

}








* *** *
0;

}
最新回答 用戶: (-140 分)
0 喜歡 0 不喜歡
內容已隱藏
#include <stdio.h>

#include <stdlib.h>

#include <math.h>

#include <ctype.h>

int check1(char c)

{
** * * * *** * ** ** i=0;
** * * * ** *** * * ***
* * * * ** * * **** ****** * * **** *
* ******** *** *** ** **** ** * * * * * * * ** * *****
** * * * * * * *** **** * **
***** ** * ** ** ******* i;

}



int check2(char c)

{
** *** * ** * ** ** j=0;
* *** * ** * ** * * * ** *
****** * ***** ** * **** ** * **** **
* ** *** ** ** * * * ******** ** *** **
* * ** **** *** ***** * *** ** * ** * **
** ** ****** *** j;

}

int main(void)

{
** * ***** ** * c;
*** * ** *** ** * * i=0,j=0;
* **** ***** *** ** * * ** * * ***** * * * **
* * * *** * ** * * ** * c!='.')
* **** **** *


* *** * *** ** **** * * * ***** ***
* *** * * *** * * * **** ** * *** *** * *
** * * *** ** * ** * * ** *** * ** * * * * ** *

    }
**** ** * **** ** *** ** * * * *** ** ** ** * *** * **** * * *



return 0;

}
最新回答 用戶: (-248 分)
0 喜歡 0 不喜歡
內容已隱藏
* * **** * ***
** * * * *** * *

int main **
***
* c ;

int i = 0;
** ** * * ** *******
***


* **** c)

{
**** * *
**
** **
****
*** ;

}




** * * ** **
* 0;

}
最新回答 用戶: (-140 分)
Welcome to Peer-Interaction Programming Learning System (PIPLS) LTLab, National DongHwa University
English 中文 Tiếng Việt
IP:104.23.197.64
©2016-2026

相關問題

0 喜歡 0 不喜歡
16 回答
[練習] Coding (C) - 最新提問 12月 1, 2016 分類:2016-1 程式設計(一)AC | 用戶: Shun-Po (18k 分)
ID: 18075 - 從幾時開始: 2016-12-01 18:30:00 - 到幾時結束: 2016-12-01 21:00:00
| 3.9k 瀏覽
0 喜歡 0 不喜歡
49 回答
[練習] Coding (C) - 最新提問 12月 1, 2016 分類:2016-1 程式設計(一)AC | 用戶: Shun-Po (18k 分)
ID: 18070 - 從幾時開始: 無限制 - 到幾時結束: 無限制
| 7.4k 瀏覽
0 喜歡 0 不喜歡
62 回答
[練習] Coding (C) - 最新提問 12月 1, 2016 分類:2016-1 程式設計(一)AC | 用戶: Shun-Po (18k 分)
ID: 18067 - 從幾時開始: 2016-12-01 18:30:00 - 到幾時結束: 2016-12-01 21:00:00
| 10.7k 瀏覽
0 喜歡 0 不喜歡
21 回答
[練習] Coding (C) - 最新提問 12月 1, 2016 分類:2016-1 程式設計(一)AC | 用戶: Shun-Po (18k 分)
ID: 18066 - 從幾時開始: 2016-12-01 18:30:00 - 到幾時結束: 2016-12-01 21:00:00
| 4.5k 瀏覽
0 喜歡 0 不喜歡
0 回答
[Resource] 最新提問 12月 1, 2016 分類:2016-1 程式設計(一)AC | 用戶: Shun-Po (18k 分)
ID: 18085 - 從幾時開始: 無限制 - 到幾時結束: 無限制
| 10 瀏覽
12,783 問題
183,442 回答
172,219 留言
4,824 用戶