0

[solved]Convert letters to numbers c# (secret message)

So i want to make a script in c# that take a word like "Hello World" take every letter and write new ones like numbers of english alphabet like Space = 0, A = 1, B = 2... "Hello World" = "8, 5, 12, 12, 15, 0, 23, 15, 18, 12, 4", After that it will be coded like some new word (so plan is to take one number and do something like this: "Letter1c = letter1 - 26" to get like another number then take that number to english alphabet and make secret code.if you wonder why 26 thats how much letters are in alphabet). I was sitting for 2 hours trying thing and did not do anything, if anyone got idea i would like to hear it

14th Feb 2020, 5:13 PM
Peree
Peree - avatar
6 ответов
+ 2
Hello Peree , Save the code in SoloLearn, and share a link to the code within your question Description. Without a code to review, how was the community able to help you? Follow this guide to sharing links, just in case you didn't know 👍 https://www.sololearn.com/post/74857/?ref=app
14th Feb 2020, 5:31 PM
Ipang
+ 1
make an array of your "key" which is space and alphabet. to convert, find the letter in the array and use the index of that letter. you can use a seeded random generator to shuffle the key/array to make it harder to decrypt.
14th Feb 2020, 5:34 PM
Taste
Taste - avatar
+ 1
Can you write your input and your expected output? Like in the code coach examples.
14th Feb 2020, 5:45 PM
CapCode
+ 1
Forgot to say its for a problem on solo learn called secret message and thank guys i will learn more on that array
14th Feb 2020, 6:20 PM
Peree
Peree - avatar
0
https://code.sololearn.com/cU4lXjrrEtus/?ref=app So i solved it after 2 days and i wondered how stupid i relly was
16th Feb 2020, 4:25 PM
Peree
Peree - avatar