have the problem with the cipher.

please help, I am having the problem with the cypher program. this program ask the user to input the cipher value and then ask the user to input the phrase to cypherer. For example, if cipher value is 1 , the the phrase is 12345 ( >>> 23456), and if the cipher value is 9, and the phrase is 1235 ( gonna be 0124). I do not know how to make the digit cycle and so do the letter. thank you.

Hi,
I didn't get what do you mean, please give more explain.
Thanks.
the user will input the cipher value and the phrase.
for example, if user input 3 to the cipher value and his phase is Aa321b. the output will be Cc654e. the problem is that I do not know how to make the digit cycle like the instruction below. please help. thank you

• Here is how to use the cipher:
o Any digit will “cycle” to another digit after “moving” as many steps as the cipher says ex.
 If cipher is 6 then 1 will become 7, and 8 will become 4
 If cipher is -2 then 9 will become 7 and 0 will become 8
o Any letter will “cycle” to another letter of the same case after “moving” as many steps as the cipher says ex.
 If cipher is 6 then ‘n’ will become ‘t’, and ‘W’ will become ‘C’
 If cipher is -2 then ‘a’ will become ‘y’ and ‘K’ will become ‘I’
Lookup the ASCII character codes it will be of great help.

Aceix.
yeah, I know that, but the problem is that when the phrase is 9 and the cipher value is 1, the output will be :, which is 58 in the ASCII code. How can I make it number 0, like i said the cycle.
Topic archived. No new replies allowed.