• Courses
  • Tutorials
  • DSA
  • Data Science
  • Web Tech
August 13, 2024 |1.9K Views

Program to print reciprocal of letters

  Share   Like
Description
Discussion

Given a string S, we need to find reciprocal of it. The reciprocal of the letter is found by finding the difference between the position of the letter and first letter ‘A’. Then moving the same number of steps from letter ‘Z’. The character that we reach after above steps is reciprocal.
Reciprocal of Z is A and vice versa because if you reverse the position of the alphabet A will be in the position of Z. 
Similarly, T is the reciprocal of G, J is the reciprocal of Q.


Program to print reciprocal of letters : https://www.geeksforgeeks.org/program-print-reciprocal-letters/