Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Use C language: Translates words from English to Spanish and Spanish to English; or from English to French and French to English, using the two

Use C language:

Translates words from English to Spanish and Spanish to English; or from English to French and French to English, using the two bilingual dictionaries shown below.

image text in transcribed

image text in transcribed

English | Cat | Dog Bird Mouse | Cow Tiger Horse Monkey Spanish Gato Perro Pajaro Raton Vaca | Tigre Caballo Mono English Cat | Dog Bird Mouse Cow Tiger Horse Monkey French Chat Chien Oiseau Souris Vache Tigre Cheval Singe Create and fill two two-dimensional arrays: ES and EF corresponding to the two tables shown above, respectively. You can hard-code these arrays. Write to four functions: trans ES, trans SE, trans EF, and trans FE that take as input a word from your dictionary in the source language, English, Spanish, English or French, respectively, and output its translation in the destination language, Spanish, English, French or English, respectively. Write a main program that will work as follows: o It will first ask the user: Please enter a word to translate: o It will then read that word. o It will then ask the user: Please enter the source language: o It will read the source language. o It will then ask the user: Please enter the destination language:"> o It will read the destination language. o It will then print: " is word that translates as in . o It will then print: Do you want to translate a new word? (Y/N): o The program will start again if the user responds Y. It will end if the user enters N. Example of a run: Please enter a word to translate: tigre Please enter the source language: spanish Please enter the destination language: english tigre is a Spanish word that translates as tiger in English. Do you want to translate a new word? (Y/N): N

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Students also viewed these Databases questions