Encoding Input-  Write a program to take input a string from user and encode the string according to rules given below. Replace all digits in the string by (digit+5)%10 Replace all uppercase alphabets to lowercase alphabet. Print the encoded string in output. language- C++

C++ for Engineers and Scientists
4th Edition
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Bronson, Gary J.
Chapter9: Completing The Basics
Section9.3: The String Class
Problem 6E: (Program) Using the at() function, write a C++ program that reads in a string by using getline() and...
icon
Related questions
Question

Encoding Input- 

Write a program to take input a string from user and encode the string according to rules given below.

  • Replace all digits in the string by (digit+5)%10
  • Replace all uppercase alphabets to lowercase alphabet.

Print the encoded string in output.

language- C++

Expert Solution
steps

Step by step

Solved in 4 steps with 2 images

Blurred answer
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr