Write a function named caesardecipher

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

Question: Write a function named caesarDecipher that accepts a key value (the Caesar shift value) as its first command-line parameter, and a string (the ciphertext) for its second parameter. Your caesarDecipher function should look like this:

caesarDecipher (shift, ciphertext):

''Returns plaintext obtained by transforming every letter in the ciphertext by a Caesar cipher by the specified shift. Non-letter characters should remain unchanged in the plaintext.''

[Your code goes here]

return [something]

Testing

To see if your code works properly, you should first try to encrypt and then decrypt a given message, and make sure it does it right.

Here are a few things for you to try to decrypt. Note that non-letters (spaces and the single quote) are copied as-is to the ciphertext.

"gduwk ydghu lv oxnh vnbzdonhu'v idwkhu" (key is 3)

"v fnirq n ybg ba zl nhgb vafhenapr ol fjvgpuvat gb trvxb" (key is 13)

Solve this question in details and provide examples to support your rationale.

Reference no: EM13693234

Questions Cloud

Console application for a furniture company : Write a C# console application for a furniture company.  Ask the user to choose P for pine, O for oak, and M for mahogany. Show the price of a table manufactured with the chosen wood.
What is the ph of a solution formed by combining hcl : Problem- What is the pH of a solution formed by combining 200.0 mL of 0.16 M HCl with 300.0 mL of 0.091 M NaOH at 25 degrees C.
What is the ph of a solution that is 0.30 m in acetic acid : Problem- What is the pH of a solution that is 0.30 M in acetic acid, HC2H3O2, and 0.70 M in sodium acetate, NaC2H3O2, at 25 degrees C.
Determine the ph of the solution after the addition of hno3 : Problem- A 100.0mL sample of 0.10M NH3 is titrated with 0.10M HNO3. Determine the pH of the solution after the addition of 50.0mL of HNO3
Write a function named caesardecipher : Write a function named caesarDecipher that accepts a key value (the Caesar shift value) as its first command-line parameter, and a string (the ciphertext) for its second parameter. Your caesarDecipher function should look like this:
Explain what mass of sodium benzoate should be added : Problem- What mass of sodium benzoate should be added to 160.0mL of a 0.13M benzoic acid solution in order to obtain a buffer with a pH of 4.30
Write a method that prompts the user for a word and prints : Write a method that prompts the user for a word and prints out its equivalent in Pig Latin. To translate a word to Pig Latin, take the initial letter, move it to the end of the word and add 'ay'. The new suffix (first letter with ay) should be pri..
What is the ksp of this salt at 25 °c : Problem- A generic salt, AB3, has a molar mass of 315 g/mol and a solubility of 8.90 g/L at 25 °C. What is the Ksp of this salt at 25 °C
A buffer solution that has a ph of 5.22 : Problem- You need to produce a buffer solution that has a pH of 5.22. You already have a solution that contains 10. mmol (millimoles) of acetic acid. How many millimoles of acetate (the conjugate base of acetic acid) will you need to add to this s..

Reviews

Write a Review

C/C++ Programming Questions & Answers

  Create program that uses functions and reference parameters

Create program that uses functions and reference parameters, and asks user for the outside temperature.

  Write a program using vectors and iterators

Write a program using vectors and iterators that allows a user to maintain a personal list of DVD titles

  Write the code required to analyse and display the data

Calculate and store the average for each row and column. Determine and store the values for the Average Map.

  Write a webservices application

Write a webservices application that does a simple four function calculator

  Iimplement a client-server of the game

Iimplement a client-server version of the rock-paper-scissors-lizard-Spock game.

  Model-view-controller

Explain Model-View-Controller paradigm

  Design a nested program

How many levels of nesting are there in this design?

  Convert celsius temperatures to fahrenheit temperatures

Write a C++ program that converts Celsius Temperatures to Fahrenheit Temperatures.

  Evaluate and output the value in the given base

Write C program that will input two values from the user that are a Value and a Base with which you will evaluate and output the Value in the given Base.

  Design a base class shape with virtual functions

Design a base class shape with virtual functions

  Implementation of classes

Implementation of classes Chart and BarChart. Class barChart chould display a simple textual representation of the data

  Technical paper: memory management

Technical Paper: Memory Management, The intent of this paper is to provide you with an in depth knowledge of how memory is used in executing, your programs and its critical support for applications.

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