+ 2
How to make program that converts string's characters to random numbers?
I wanna make a program that converts strings's characters into random numbers let me explain in details example: I wrote "baba" in the text field, I have assigned a random number for every character example for 'a' 1 to 5 and 'b' 6 to 10 so if I write 'baba', a program should give output '7283' the output should be different every time, as 'a' represents a number between 1 to 5 and 'b' represents a number between 6 to 10 This program also can be used for simple encryptions...
7 Réponses
+ 2
In c++ ,
it can help to hide small messages
+ 4
Deep@Code You have to post some code (this prevent who want get homework maded from others).
I think that you want "decript" also these messages and with this method you cannot do it (but you have missed some details)
+ 1
Deep@Code You missed some info... Which language? Where is your current work code?
Anyway i dont think that you can be encrypt something in this way
+ 1
in python you can use like
>>>import random
>>>letters="a","b","c"...
>>>RandomLetters=random.choice (letters)
and now if you use like
>>>print (RandomLetters)
it will be random
+ 1
hope u understand
+ 1
in cpp you can use bit operators to create number from strings
https://code.sololearn.com/csVlALL59Pa7/?ref=app
0
here in c languages
https://code.sololearn.com/cPERBLorLZq0/?ref=app