本文实例为大家分享了C语言实现翻译功能的具体代码,供大家参考,具体内容如下
#include#define number 100 struct date { char chinese[30]; char English[30]; }a[number]; void copy(char *str1, char *str2, int counst)//将值赋给trans { int i = 0; if (str2 == ' ' || str2 == ' ') { return; } while (counst--) { *str1++ = *str2++; } return; } int panduan(char *d, char *f)//判断是否相等 { char *str1 = d, *str2 = f; int xc=0; while (!(xc = *str2 - *str1)&&*str1) { str1++; str2++; } if (xc != 0) { return 0; } return 1; } char* ry( struct date a[number],char *wordtemp,int x) { for (int i = 0;i


