Answer to Question #185620 in C++ for Aditya Pandey

Question #185620

A lady behaves like a teacher in a classroom, mother or daughter in a home and 

customer in a market. Here, a single person is behaving differently according to the 

situations. Consider a above real-life example and which concept you will use in cpp. 

Elaborate the concept.


1
Expert's answer
2021-04-27T05:23:26-0400
str1 = "abcdefghijklmnopqrstuvwxyz"
str1_upp = str1.upper()
str2 = "zyxwvutsrqponmlkjihgfedcba"
str2_upp = str2.upper()
table = "".maketrans(str1+str1_upp, str2+str2_upp)


while True:
   n = input("Enter a string: ")
   if len(n) == 0:
       break 
   print("Traslate: ", n.translate(table))

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS