當前位置:成語大全網 - 書法字典 - C語言關鍵詞漢英翻譯機(只翻譯C語言的關鍵詞)。求高手幫忙......

C語言關鍵詞漢英翻譯機(只翻譯C語言的關鍵詞)。求高手幫忙......

# include & ltstdio.h & gt

# include & ltstring.h & gt

char* bijiao(char* s1,char* s2[],char* s3[])

{

int i,j;

for(I = 0;我& lt32;i++)

{

for(j = 0;j & lt(int)strlen(S2[I]);j++)

{

if(s1[j]!= S2[I][j])break;

}

if(j==(int)strlen(s2[i]))

返回S3[I];

for(j = 0;j & lt(int)strlen(S3[I]);j++)

{

if(s1[j]!= S3[I][j])break;

}

if(j==(int)strlen(s3[i]))

返回S2[I];

}

返回“未找到數據”;

}

void main()

{

字符串[50];

char* str1[32]={"auto "," break "," case "," char "," const "," continue "," default "

、" do "、" double "、" else "、" enum "、" extern "、" float "、" for "、" goto "、" if "、" int "

、" long "、" register "、" return "、" short "、" signed "、" static "、" sizeof "、" struct "

、" switch "、" typedef "、" union "、" unsigned "、" void "、" volatile "、" while " };

Char* str2[32]={ "自動變量","跳出當前循環","切換語句分支","字符變量","只讀變量","結束當前循環","其他分支"。

、“循環語句的循環體”、“雙精度變量”、“條件語句負分支”、“枚舉類型”、“聲明的變量正在其他文件中聲明”、“浮點變量”、“循環語句”、“跳轉語句”、“條件語句”、“整數變量”

、“長整型變量”、“寄存器變量”、“返回語句”、“短整型變量”、“有符號類型變量”、“靜態變量”、“計算數據類型長度”和“結構變量”

、“switch語句”、“用於別名數據類型”、“使用數據類型”、“無符號類型變量”、“無返回值”、“表示程序執行過程中變量可以隱式更改”、“循環語句的循環條件”};

while(1)

{

gets(str);

if(str[0]= = ' b ' & amp;& ampstr[1]= = ' y ' & amp;& ampstr[2]= = ' e ' & amp;& ampstr[3]=='\0 ')返回;

puts(bijiao(str,str1,str 2));

printf(" \ n ");

}

}