c语言中英翻译机源代码,求助热心人 作业不会 ——C语言关键字中英翻译机。...

该楼层疑似违规已被系统折叠 隐藏此楼查看此楼

}//the end of while(...)

}

//the 1st dictionary

void FindChinese()

{

char *p, eword[20] = "r";

p=eword;

while(1)

{

int f=0;

printf("Enter the English word you want to look up:(enter u to go upper lever)\n");

scanf("%s",p);

//should be checked here.........

if(strcmp(p,"u")==0) break;//go upper

if(f==0 && (strcmp(p,"int")==0))     {f=1;     printf("\n%s: 整形\n",p);}

if(f==0 && strcmp(p,"float")==0)   {f=1;     printf("\n%s: 浮点型\n",p);}

if(f==0 && strcmp(p,"sunny")==0)   {f=1;     printf("\n%s: 阳光灿烂的\n",p);}

//more words here^_^

//more words here^_^                 链接词库 | 接口确定后需要继续修改...

//more words here^_^

if(f==0)    printf("\nsorry, can't find the word\n");

}

}

//the 2nd dictionary

void FindEnglish()

{

char *p, cword[20] = "r";

p=cword;

while(1)

{

int f=0;

printf("请输入您想查找的中文词语:(输入u返回上层)\n");

scanf("%s",p);

//should be checked here.........

if(strcmp(p,"u")==0) break;//go upper

if(f==0 && (strcmp(p,"整形")==0))     {f=1;     printf("\n%s: int\n",p);}

if(f==0 && strcmp(p,"浮点型")==0)     {f=1;     printf("\n%s: float\n",p);}

if(f==0 && strcmp(p,"长整型")==0)     {f=1;     printf("\n%s: long\n",p);}

//more words here^_^

//more words here^_^                链接词库 | 接口确定后需要继续修改...

//more words here^_^

if(f==0)    printf("\n很抱歉,没有找到这个中文词条\n");

}

}

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值