Maurice Tutor

(5)

$15/per page/Negotiable

About Maurice Tutor

Levels Tought:
Elementary,Middle School,High School,College,University,PHD

Expertise:
Algebra,Applied Sciences See all
Algebra,Applied Sciences,Biology,Calculus,Chemistry,Economics,English,Essay writing,Geography,Geology,Health & Medical,Physics,Science Hide all
Teaching Since: May 2017
Last Sign in: 398 Weeks Ago, 2 Days Ago
Questions Answered: 66690
Tutorials Posted: 66688

Education

  • MCS,PHD
    Argosy University/ Phoniex University/
    Nov-2005 - Oct-2011

Experience

  • Professor
    Phoniex University
    Oct-2001 - Nov-2016

Category > Management Posted 20 Feb 2018 My Price 9.00

Caesar encryption method

*Please write code in both C and C+ language to be chosen as best answer. Please answer each part of the question with thorough explanation*

Consider the following program that is designed to perform Caesar encryption method.

Type, compile, run, and observe the output.

Is there any bug or deficiency concerning the solution?If yes what are they and how can be fixed?

Modify the program (code) such that it could shift the string by any number between 1 and 26.

Modify the program (code) such that the user can run it as many time as he/she wants.

You should provide digital and hard copy of your work.

#include <iostream>

#include <string>

using namespace std;

int main(int argc, char **argv)

{

            string input;

            int count = 0, length ;

                       

            cout <<" Enter your phrase:"<<endl;

            getline (cin, input);

            length = (int) input.length ();

            for (count = 0; count < length; count++)

            {

                        if (isalpha (input [count]))

                        {                     

                                    for (int i = 0; i < 12; i++)

                                    {

                                                if (input [count] == 'z')

                                                            input [count] = 'a' ;

                                                else

                                                            input[count] ++;

                                    }

                        }

            }

            cout << " Results: \n" << input<<endl;                      

    system("PAUSE");

    return EXIT_SUCCESS;

}

Answers

(5)
Status NEW Posted 20 Feb 2018 06:02 PM My Price 9.00

Hel-----------lo -----------Sir-----------/Ma-----------dam-----------Tha-----------nk -----------You----------- fo-----------r u-----------sin-----------g o-----------ur -----------web-----------sit-----------e a-----------nd -----------acq-----------uis-----------iti-----------on -----------of -----------my -----------pos-----------ted----------- so-----------lut-----------ion-----------.Pl-----------eas-----------e p-----------ing----------- me----------- on-----------cha-----------t I----------- am----------- on-----------lin-----------e o-----------r i-----------nbo-----------x m-----------e a----------- me-----------ssa-----------ge -----------I w-----------ill----------- be-----------

Not Rated(0)