Like many others, Mr. Baker has way too many credit cards, each with its own 3-digit code on the back of the card. Since Mr. Baker is forgetful, he chooses to carefully record the 3-digit codes in the Notes app on his iPhone. Of course, he is smart enough not to write the real combination, and has devised a simple coding scheme that translates the 3-digit code into an encrypted one, by swapping the first and the third digit of the code, and replacing second digit by its 9’s complement. A code of the form abc is therefore encoded as c(9-b)a. For example, if the real 3-digit code is 250, the encrypted code willbe 042. A nice feature in his coding scheme is that he can apply the same scheme again on the encrypted code to calculate the real one. In this part, you will need to write a C program to help Mr. Baker. The program asks the user to enter an encrypted 3-digit code and then prints the real 3-digit code.
-
Notifications
You must be signed in to change notification settings - Fork 0
Like many others, Mr. Baker has way too many credit cards, each with its own 3-digit code on the back of the card. Since Mr. Baker is forgetful, he chooses to carefully record the 3-digit codes in the Notes app on his iPhone. Of course, he is smart enough not to write the real combination, and has devised a simple coding scheme that translates t…
Hasteerp/PasswordDecipher
About
Like many others, Mr. Baker has way too many credit cards, each with its own 3-digit code on the back of the card. Since Mr. Baker is forgetful, he chooses to carefully record the 3-digit codes in the Notes app on his iPhone. Of course, he is smart enough not to write the real combination, and has devised a simple coding scheme that translates t…
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published