用C語言編寫“背單詞程式”,用C語言編寫如下程式?

時間 2021-10-23 12:58:18

1樓:董俊錕

#include

#include

#include

struct word //定義一個word的結構體,裡面的兩個成員分別放英語單詞和相應的漢語翻譯

;int point=0; //統計分數的

int count1=0; //測試的次數

void tianjia(struct word str[100],int &count); //函式宣告,往詞庫中新增片語

void shuchu(struct word str[100],int &count); //函式宣告,輸出詞庫中所有的片語

void fanyi1(struct word str[100],int &count); //函式宣告,輸入漢語,對英語翻譯的考察

void fanyi2(struct word str[100],int &count);

void chaxun(int point,int count1); //函式宣告,輸出成績!

void main()

default :printf("你輸入了錯誤的操作,無法執行!!!");

exit(0);}}

}void tianjia(struct word str[100],int &count) //往詞庫中新增片語

while(ch=='y');

printf("%d\n\n",count);

}void shuchu(struct word str[100],int &count) // 輸出詞庫中所有的片語

else

printf("詞庫所有單詞輸入完畢!!!!\n");}}

void fanyi1(struct word str[100],int &count) //輸入漢語,對英語翻譯的考察

else}}

}void fanyi2(struct word str[100],int &count) //輸入英語,對漢語翻譯的考察

else }}

}void chaxun(int point,int count1)

2樓:

編個程式不容易的哦~~~~

用c語言編寫如下程式?

3樓:

我再幫你補一課,看了你的標題,我寫了一個用定時器0來控制一個led燈第隔1秒鐘亮滅一次的程式,希望對你有用,另外我也寫了一個你說的那個程式,一起發上來吧

#include

#define uchar unsigned char

#define uint unsigned int

/**************************************/

uchar num;

bit tt;

sbit d=p1^0;

/******************主程式入口********************/

void main() }

}void timer() interrupt 1

****************這個程式是逐個點亮的(思路:由256逐減1,值由led燈顯示)***********************

#include

#define uchar unsigned char

#define uint unsigned int

/**************************************/

uchar num,tt;

//bit tt;

sbit d=p1^0;

/******************主程式入口********************/

void main() }

}void timer() interrupt 1

用C語言編寫程式資料結構,用C語言編寫程式 資料結構 20

第5 題 include include define max 256 typedef int list max typedef int elemtype typedef int status define overflow 1 define ok 1 define list init size 8...

C語言程式設計,編寫程式,求10 用C語言

第0題 include define maxlen 70 main int i,temp,flag 0 printf 請輸入第一個字串 n scanf s s1 printf 請輸入第二個字串 n scanf s s2 i strlen s1 temp strlen s2 if i main x i...

用C 語言編寫程式,遞迴函式,用c 編寫程式用遞迴法計算一個整數的所有數字之和

1 在數學上,關於遞迴函式的定義如下 對於某一函式f x 其定義域是集合a,那麼若對於a集合中的某一個值x0,其函式值f x0 由f f x0 決定,那麼就稱f x 為遞迴函式。在程式語言中,把直接或間接地呼叫自身的函式稱為遞迴函式。函式的構建通常需要一個函式或者一個過程來完成。2 遞迴函式 是建立...