The world’s Largest Sharp Brain Virtual Experts Marketplace Just a click Away
Levels Tought:
Elementary,Middle School,High School,College,University,PHD
| Teaching Since: | Apr 2017 |
| Last Sign in: | 103 Weeks Ago, 3 Days Ago |
| Questions Answered: | 4870 |
| Tutorials Posted: | 4863 |
MBA IT, Mater in Science and Technology
Devry
Jul-1996 - Jul-2000
Professor
Devry University
Mar-2010 - Oct-2016
For this lab we are going to be creating a basic encryption/decryption function. The principle function we are writing will call an encrypt function and/or a decrypt function. Normally, I wouldn't spec the additional functions for you to write but for this lab I'm listing at least 3 functions you need to write.
Our encryption is going to be basic. If a letter is simply going to be replaced with a different letter from the alphabet. Use this scheme when encrypting or decrypting:
a == zÂ
b == yÂ
c == xÂ
d == wÂ
e == vÂ
f == uÂ
g == tÂ
h == sÂ
i == rÂ
j == qÂ
k == pÂ
l == oÂ
m == n
and so on.... (you must go all the way to z == a)
So an 'a' will be come 'z' and a 'z' will become an 'a', a 'b' will become an 'y' and an 'y' will be come a 'b', and so on. We'll only be dealing with lower case letters. Any thing that isn't a lower case letter just gets "added" to the results string. So spaces stay spaces, punctuation stays punctuation, etc.
Here's a snippet of code you can use to start that process:
string results = "";
for ( int i=0; i<input.length(); i++ )
{
if ( input[i] == 'a' )
{
results = results + "z";
}
Requirements
Â
I need help coding in c++
-----------