subject
Computers and Technology, 12.04.2021 20:50 svg8

Write a program that encrypts a message using a Caesar cipher. The user will enter the message to be encrypted and the shift amount (the number of positions by which letters should be shifted):Enter message to be encrypted: Go ahead, make my day. Enter shift amount (1 - 25): Encrypted message: Jr ddg, pdnh pb gdb. Notice that the program can decrypt a message if the user enters 26 minus the original key: Enter message to be encrypted: Jr ddg, pdb pdb gdb. Enter shift amount (1 - 25): 23 Encrypted message: Go ahead, make my day. You may assume that the message does not exceed 80 characters. Characters other than letters should be left unchanged. Lower-case letters remain lower-case when encrypted and uppercase letters remain upper-case. Hint: To handle the wrap-around problem, use the expression (( ch - 'A' ) n) % 26 'A' to calculate the encrypted version of an uppercase letter, where ch stores the letter and n stores the shift amount (use similar expression for lower-case as well.) We will use the following function: void encrypt(char *message, int shift);

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 02:30
Which component acts as a platform on which application software runs
Answers: 2
question
Computers and Technology, 23.06.2019 13:00
In excel - calculate the actual increase/decrease from first quarter to the second quarter then subtract subtract first quarter value from second quarter total then divide result by first quarter value
Answers: 1
question
Computers and Technology, 23.06.2019 15:20
In a game with three frames, where will the objects on layer 1 appear? a. next to the play area b. in the middle of the game c. behind everything else d. in front of everything else
Answers: 1
question
Computers and Technology, 24.06.2019 13:20
3. ranga ramasesh is the operations manager for a firm that is trying to decide which one of four countries it should research for possible outsourcing providers. the first step is to select a country based on cultural risk factors, which are critical to eventual business success with the provider. ranga has reviewed outsourcing provider directories and found that the four countries in the table that follows have an ample number of providers from which they can choose. to aid in the country selection step, he has enlisted the aid of a cultural expert, john wang, who has provided ratings of the various criteria in the table. the resulting ratings are on a 1 to 10 scale, where 1 is a low risk and 10 is a high risk. john has also determined six criteria weightins: trust, with a weight of 0.3; quality, with 0.2; religious, with 0.1; individualism, with 0.2; time, with 0.1; and uncertainity, with 0.1. using the factor-rating method, which country should ranga select? why? (2 points)
Answers: 3
You know the right answer?
Write a program that encrypts a message using a Caesar cipher. The user will enter the message to be...
Questions
question
Mathematics, 19.01.2021 23:10
question
Mathematics, 19.01.2021 23:10
question
Mathematics, 19.01.2021 23:10
Questions on the website: 13722363