Hey guys, I two right a code exactly like this for my class. I have no idea how
ID: 3617684 • Letter: H
Question
Hey guys,I two right a code exactly like this for my class.
I have no idea how to change the letters could you give me a hintplease
tyson
here is the question
Write a program to encrypt/decrypt the output of a file. Yourprogram should be able to read
characters from a file, encode/decode each character and save theencoded/decoded message
to another file.
Characters are encoded by substituting them with the character thatappears two positions
ahead of it in the ASCII table. 'A' becomes 'C', 'z' becomes '|'and so on.
Stop encoding when you read a '*' in the file.
Characters are decoded by substituting them with the character thatappears two positions
behind it in the ASCII table. 'C' becomes 'A', '|' becomes 'z' andso on.
Stop decoding when you read a ',' in the file.
Your program MUST have at least the following two functions:
• void encodeFile(char inputFileName[], charoutputFileName[]) - that reads and
encodes the characters of the file with name inputFileName andstores it in a file
having name outputFileName.
• void decodeFile(char inputFileName[], charoutputFileName[]) - that reads and
decodes the characters of the file with name inputFileName andstores it in a file
having name outputFileName.
The correct encoding of the string Hello World* is Jgnnq"Yqtnf,
Explanation / Answer
please rate - thanks #include #include using namespace std; void decodeFile(char [], char []); void encodeFile(char [], char []); int main() { int ende; char filenamein[20]; char filenameout[20]; cout >filenamein; cout >filenameout; coutende; if(ende==1) encodeFile(filenamein,filenameout); else decodeFile(filenamein,filenameout); coutRelated Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.