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, 22.06.2019 15:00
Hyperactive media sales has 10 windows 7 laptop computers used by sales-people in the organization. each laptop computer has several customized applications that are used during the sales process as well as customer relationship management software. all of the applications on the laptops are difficult to configure and have large data files. if all of the laptops have current hardware, what is the easiest way to install windows 10 on them?
Answers: 1
question
Computers and Technology, 22.06.2019 15:30
To increase sales, robert sends out a newsletter to his customers each month, letting them know about new products and ways in which to use them. in order to protect his customers' privacy, he uses this field when addressing his e-mail. attach bcc forward to
Answers: 2
question
Computers and Technology, 22.06.2019 18:30
What is outfitting a workplace with video in a technology
Answers: 2
question
Computers and Technology, 23.06.2019 06:00
Respond to the following in three to five sentences. select the workplace skill, habit, or attitude described in this chapter that you believe is most important for being a successful employee.
Answers: 1
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, 04.11.2020 03:10
question
Mathematics, 04.11.2020 03:20
question
Mathematics, 04.11.2020 03:20
question
Mathematics, 04.11.2020 03:20
question
Mathematics, 04.11.2020 03:20
Questions on the website: 13722362