Sunday, July 17, 2011

How do I write a C++ Program that converts entered text to a "secret code"?

Essentially, what I'm trying to do is write a C++ code that will convert entered text into numbers. For example, if I typed "Hello" then the program would print out the number of the letter in the alphabet. Of course that isn't the actual code, but I need the framework for it. So how would I go about doing this? To my knowledge, I can use a switch statement so that when the user inputs the sentence, the letters will automatically get changed to the corresponding numbers, but I don't know exactly how to set that up.

No comments:

Post a Comment