Categories

english to french dictionary

#include
#include

char dict[][2][40] = {
“hello”,”bonjour” ,
“year”,”annee” ,
“good”,”bon” ,
“car”,”voiture” ,
“house”,”maison” ,
“yes”,”oui” ,
“friend”,”ami” ,
“road”,”rue” ,
“”,”"
};

int main(void)
{
int i = 0;
char word[80];

printf(“Enter a word in English to search for.n”);
gets(word);
while(strcmp(dict[i][0],”"))
{
if(!strcmp(word,dict[i][0]))
{
printf(“French equivalent is : %sn”,dict[i][1]);
break;
}
i++;
}

if(!strcmp(dict[i][0], “”))
printf(“Word not found.n”);

return 0;
}

No related posts.

Related posts brought to you by Yet Another Related Posts Plugin.

You must be logged in to post a comment.