Asks the user for the name of an input file and translates

Assignment Help C/C++ Programming
Reference no: EM13159218

ROT13 (rotate by 13 places) is a simple letter substitution cipher that is an instance of a Caesar cipher developed in ancient Rome and used by Julius Caesar who used it in his private correspondence. ROT13 replaces a letter with a letter 13 characters after it in the alphabet. The following table demonstrates the transliation in ROT13:

A <-> N

B <-> O

C <-> P

D <-> Q

E <-> R

F <-> S

G <-> T

H <-> U

I <-> V

J <-> W

K <-> X

L <-> Y

M <-> Z

Thus, the translation of the word JULIUS using ROT13 would be WHYVHF.

Write a C++ program that asks the user for the name of an input file and translates the contents of that input file using ROT13. Your main function should be responsible for reading the input file and coordinating calls to a value-returning function named Rot13 that will do the translation for each character andWriteTranslatedCharacter that will write the translated character to a secondary file. The Rot13 function takes as input the character to be translated and returns the translated character. The second function namedWriteTranslatedCharacter will have two parameters, the translated character and a reference to an ifstream data type for a secondary file named "output.rot13", and write the translated character to this file.

 

 

Reference no: EM13159218

Questions Cloud

Cost method in the preparation of a consolidated workpaper : S Company earned $840,000 evenly throughout the year and declared a dividend of $300,000 on November 1. What is the amount needed to establish reciprocity under the cost method in the preparation of a consolidated workpaper on December 31, 2011?
Virtual and physical addresses : The page table shown in Figure 9.32 is for a system with 16-bit virtual and physical addresses and with 4,096-byte pages. The reference bit is set to 1 when the page has been referenced. Periodically, a thread zeroes out all values of the reference b..
Write a program that reads the data in the file and displays : Write a program that reads the data in the file and displays the car number, miles driven, gallons used and the miles per gallon for each car.
Initialize an array and fill the array with the gpa values. : Write a program in java that asks user input (using a loop) for name of 10 student and the corresponding grade point averages (GPAs). Initialize an array and fill the array with the GPA values.
Asks the user for the name of an input file and translates : Write a C++ program that asks the user for the name of an input file and translates the contents of that input file using ROT13. Your  main  function should be responsible for reading the input file and coordinating calls to a value-returning functio..
Compare u.s. and e.u. policies : Compare U.S. and E.U. policies and underlying philosophies of privacy. Include references to monitoring and privacy in the workplace, surveillance, and disclosure/data privacy. In your estimation, could self-regulation be effective or does it need to..
Write a function that takes an integer array : 1. Write a function that takes an integer array and the array's size as parameters. The function will check if the array is sorted. If it is, it will return a 1. If it is not sorted it will return 0. The function should not  sort the array.
The mean and standard deviation : How do i write a program in c++ that use functions max, min, the total numbers, the mean and standard deviation to read a file text and return these values from the file text. note the file text has random numbers. note im not suppose to use arrays.
Write a count occurrences() function that accepts a string : Write a CountOccurrences() function that accepts a string to be searched and a sub-string to be found. The function should return the # of times the sub-string is found. Write a tester file that declares a secret sentence as a constant.

Reviews

Write a Review

C/C++ Programming Questions & Answers

  Create if-then statement with single alternative decision

Create the If-Then statement (or a flowchart with a single alternative decision structure) which assigns 20 to  variable y and allots 40 to variable z if variable x is greater that 100.

  Write a program that will be used to gather statistical data

Write a program that will be used to gather statistical data about the number of movies

  Write c function to sort one dimensional integer array

Consider the values sorted in the array. Sort it in ascending order using Bubble sort technique showing all iterations: write C function to sort one dimensional integer array in ascending order.

  Write program function prompt user for number of elements

Write a C++ program main function which will prompt the user for the number of elements called N desired for an array which has the capacity to store 50 elements.

  Write program to declare the array of type float

Write down the c++ program which declares the array of 50 components of type float. Initialize array so that first 25 components are equal to square of the index variable.

  Write recursive boolean method to accept array and value

Write down the recursive boolean method named isMember. The method must accept two arguments: an array and a value. Method must return true if value is found in array.

  Assign passed value to function to return value

Assign passed value to this member and another function to return value. Your main should read the integer from an input data file, and write the output to the output data file.

  C programme to find the minimum and maximum value

write a c programme to find the minimum and maximum value each elements in each row ,to create table b,having 5 rows and 2 coloums,the first coloum of table b is the maximumvalue and thye second coloum is the maximum value in each row.

  Iterative programming problem solving approaches

Write a recursive function void reverse ( ) that reverse a sentence

  Define a structure to store marks of a student

Define a structure to store roll no, name and marks of a student - using the structure of Q2. a), above write a 'C' program to create a file "student.dat". There must be one record for every student in the file.

  Allows the user to enter the coefficients for a system

Create a graphical (not text-based) Visual C++ program that allows the user to enter the coefficients for a system of four equations with four unknowns. Include a button that when clicked, will solve the system of equations and display the results in..

  Ruby implement primitive types

How does Ruby implement primitive types, such as those for integer and floating-point data?  3-What is the single most important practical difference between Smalltalk and C++?

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd