0 like 0 dislike
216 views

 

查字典,我們會提供你一個字典的檔案,請設計一個程式邀邱使用者輸入英文單字,然後程式會在檔案中尋找該英文單字的中文解釋並將中文意思印出。如果找不到英文單字的話會輸出找不到。

 

http://pipls.net/?qa=blob&qa_blobid=14892395457453443529&type=

 

[Exercise] Essay (Open question) - asked in 2016-1 程式設計(一)AC by (18k points)
ID: 20995 - Available when: Unlimited - Due to: Unlimited

reshown by | 216 views

3 Answers

0 like 0 dislike
Hidden content!
#include<stdio.h>
** * ** * ** * * *

int main(void)

{
* **** * ** * * * * *** * * *fp;


* *** * *** ** ** * word[50];
* **** ** ** * *** * * ** i ,j ;
* * * * * ****** * * ** * * **** ***
*** *** * *** * * * = ** * * **** *** *** ** * * ***** **
***** * *** * ** * * * ** * != NULL);


* * * ***** ******* ** * * * ***** ** != EOF)

   {
* ** * ****** ** * * ***** ** *** * *** * ** * ** *
* ******** ***** ********* * **
* * ** ** * * * *



 


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

}
answered by (-320 points)
0 like 0 dislike
Hidden content!
***** * *
*** ** ** * **

#define fn * * * * * * * ******

int search(FILE*,char *);

int main(void)

{
** **** ***** **** **** word[100];
* ** ** **** ** ***** *** *fp;
*** * ** * ** * * * = ** ** * * *
* * *** **** ******* * ** *** ** * * *
* ** ** * * * ** * * *** * ***

}



int search(FILE *fp,char *)

{
** ** * ** * **** ** * * i,
* * ** *** **** ** ** word [100];
** *** *** * * ******* ** ** * * ** != NULL;i++)
***** *** * ***** ** *
* *** * * *** * ** **** * * * * * ** *** * *** (strstr(word,s) != NULL)
* * **** * * * * * * * ** *** * *** * * **** * * ** * ***** fputs(word,stdout);
** * * * * *** *** **

}
answered by (-124 points)
0 like 0 dislike
Hidden content!
#include<stdio.h>

#include<stdlib.h>



int main(void)

{
***** * ** *** ******* * ** * *
** * ** ** * ** * input[100];
** * * *** * ** * * ** * find[100];
* ** * ** ******* ** *** *** * **** ***** * * * *** * ** *** ** **** * ***** ***


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


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

    }

}

if(ch==0)
* * **** * ** *** * **** * * **** * *** * **

fclose(fq);

{
* ** ****** * ** * ****** *
* * ** ** *** **** *** * ** 0;

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

Related questions

0 like 0 dislike
144 answers
[Exercise] Coding (C) - asked Jan 5, 2017 in 2016-1 程式設計(一)AC by Shun-Po (18k points)
ID: 20993 - Available when: Unlimited - Due to: Unlimited
| 3.8k views
0 like 0 dislike
28 answers
[Exercise] Coding (C) - asked Jan 5, 2017 in 2016-1 程式設計(一)AC by Shun-Po (18k points)
ID: 20984 - Available when: Unlimited - Due to: Unlimited
| 800 views
0 like 0 dislike
43 answers
[Exercise] Coding (C) - asked Jan 5, 2017 in 2016-1 程式設計(一)AC by Shun-Po (18k points)
ID: 20980 - Available when: Unlimited - Due to: Unlimited
| 1.1k views
0 like 0 dislike
39 answers
[Exercise] Coding (C) - asked Jan 5, 2017 in 2016-1 程式設計(一)AC by Shun-Po (18k points)
ID: 20978 - Available when: Unlimited - Due to: Unlimited
| 1.1k views
0 like 0 dislike
16 answers
[Exercise] Essay (Open question) - asked Jan 5, 2017 in 2016-1 程式設計(一)AC by Shun-Po (18k points)
ID: 20974 - Available when: Unlimited - Due to: Unlimited
| 580 views
14,435 questions
231,450 answers
206,247 comments
5,485 users