Question: You are to write a program to perform a simple encryption scheme in which each letter of a word is interchanged with another using a

 You are to write a program to perform a simple encryption

You are to write a program to perform a simple encryption scheme in which each letter of a word is interchanged with another using a translation table. For each letter of a word, you are to look it up in a table and replace it with the corresponding letter. For example, given the translation table below, all 'a' letters become 'f letters, 'b' becomes 'c', etc. a b c d e f g h i j k l m n o p q r s t u v w x y z f c s a n k r p o y g u i m q v t w x j l b d e z h You program should read in the first two lines of the data file to be the translation table. The remaining data file will contain the number of words in the sentence and the sentence to be translated. For example, the data file may look like: a b c d e f g h i j k l m n o p q r s t u v w x y z f c s a n k r p o y g u i m q v t w x j l b d e z h 9 the rain in spain falls mainly on the plains 6 the man engineers the profuse danger 6 the heat accelerates the brawny change 6 the trick maps the superficial stretch 5 the structure converts the value 6 the gaudy exchange enables the snow 5 the meal assesses the note 6 the kick confers the economic person 6 the bright group studies the lift 6 the dear music advertises the woman 5 the week maps the birth The output should be the original sentence followed by its translation and in the same order as the data file. There are an unknown number of sentences of various lengths. For example, the output for the first sentence appears below. the rain in spain falls mainly on the plains jpn wfom om xvfom kfuux ifomuz qm jpn vufomx The data file is located at dmk0080/public/1040/labs/exam l/sentences. Name your program encryption.c

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!