Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

HOW TO THIS QUESTION IN C + + Hector is in grade 3 and likes a girl in his class, Julia, very much. He has

HOW TO THIS QUESTION IN C++
Hector is in grade 3 and likes a girl in his class, Julia, very much. He has written a letter to her, but he needs you to help him to encode the letter, so that if someone in the class gets hold of it, they would not be able to understand it. Write a program that reads an input file with the letter character by character. Change the following characters:
t (or T) gets changed to 1Y h (or H) gets changed to 1O j (or J) gets changed to 1X d (or D) gets changed to 1B a (or A) gets changed to 1S p (or P) gets changed to 1M I (or I) gets changed to 1Q
The rest of the characters remain the same. Read the file character by character, and write the character (if it stays the same) to the output file, or write the changed version to the output file. Call your output file encode.txt.
Create an input file called letter.txt with Hectors letter:
Dear Julia,
You are the most beautiful girl that I have ever seen. I was wondering if you would like to come and visit me. My mother will make us pancakes with ice cream. My dog, Bella, just had three beautiful puppies. Mom says I may only keep one of them. I would like you to help me choose one, because they are all so cute and adorable. And just because you are my special friend, you may also have one if you want.
Your friend, Hector.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored 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

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Essentials of Database Management

Authors: Jeffrey A. Hoffer, Heikki Topi, Ramesh Venkataraman

1st edition

133405680, 9780133547702 , 978-0133405682

More Books

Students also viewed these Databases questions

Question

1. Who is responsible for resolving this dilemma?

Answered: 1 week ago