Basically, i need a code to encode and decode a text combined only by capital letters and blank spaces. The text needs to be encoded on a way that every letter is changed by ascii code is raised by the smallest figure of a random entered three-digit number. The text and the numbers have to be different. And this is what i got, i could use a bit help, THANKS YOU UPWORDS AND ALOT !
Try doing a single character by hand. Suppose the character code is 12:
Line 21 sets it to 12+13=25.
25 is divisible by 5 so line 24 sets it to 25+7=32.
Now look at the decode part.
Line 33 sets it to 32=13 = 19.
19 is not divisible by 5 so line 36 isn't executed
The So the decoded character is 19, which is wrong.
My advice is to work out the algorithm by hand with a few characters. Once you're pretty sure you have the algorithm right, convert it to code.
Basically, i need a code to encode and decode a text combined only by capital letters and blank spaces. The text needs to be encoded on a way that every letter is changed by ascii code is raised by the smallest figure of a random entered three-digit number. The text and the numbers have to be different. And this is what i got, i could use a bit help, THANKS YOU UPWORDS AND ALOT !
Well, I don't believe "this is what I got".
And I don't see what this has got to do with "every letter is changed by ascii code is raised by the smallest figure of a random entered three-digit number".
Make an effort - by yourself - maybe someone will try to help you.
Rip off somebody else's code and try to pass it off as your own - well, not convinced anyone will want to look at it.