0 like 0 dislike
431 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 | 431 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.69.59.110
©2016-2025

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
| 7.1k 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
| 1.7k 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
| 2.4k 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
| 2.2k 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
| 1.1k views
12,783 questions
183,443 answers
172,219 comments
4,824 users