vb语言关键字中英翻译机

vb语言关键字中英翻译机... vb语言关键字中英翻译机 展开
 我来答
访朴荷2799
2017-06-30 · TA获得超过1250个赞
知道小有建树答主
回答量:1410
采纳率:0%
帮助的人:437万
展开全部
#include<stdio.h>
#include<string.h>
char* bijiao(char* s1,char* s2[],char* s3[])
{
int i,j;
for(i=0;i<32;i++)
{
for(j=0;j<(int)strlen(s2[i]);j++)
{
if(s1[j]!=s2[i][j]) break;
}
if(j==(int)strlen(s2[i]))
return s3[i];
for(j=0;j<(int)strlen(s3[i]);j++)
{
if(s1[j]!=s3[i][j]) break;
}
if(j==(int)strlen(s3[i]))
return s2[i];
}
return "没有找到数据";
}
void main()
{
char str[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]={"自动变量","跳出当前循环","开关语句分支","字符型变量","只读变量","结束当前循环","其他分支"
,"循环语句的循环体","双精度变量","条件语句否定分支","枚举类型","声明变量是在其他文件正声明","浮点型变量","循环语句","跳转语句","条件语句","整型变量"
,"长整型变量","寄存器变量","返回语句","短整型变量","有符号类型变量","静态变量","计算数据类型长度","结构体变量"
,"开关语句","用以给数据类型取别名","共用数据类型","无符号类型变量","无返回值","说明变量在程序执行中可被隐含地改变","循环语句的循环条件"};
while(1)
{
gets(str);
if(str[0]=='b'str[1]=='y'str[2]=='e'str[3]=='\0')return ;
puts(bijiao(str,str1,str2));
printf("\n");
}
}
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式