You are missing a big part.
Note this is all in pseudo-code. Nothing real. Just to give you the idea.
You have your string.
CODE
input = "How are you son?"
input = ["H","o","w"," ","a","r","e"," ","y","o","u"," ","s","o","n","?"]
Yes?
OK, so what you need to do is go through each character and check if it needs to be replaced so:
CODE
while (x < input.length):
if (input[x].lower = "a"):
input[x] = @
if (input[x].lower = "s"):
input[x] = $
note I added .lower as a sign that you need to check for both cases, which I presume is true.
So at the moment, this code will go like this.
x = 0
x is less than 15
the letter at position 0 is "H"
this isn't a
this isn't s
now, this will just check H again and again.
We need to make it:
CODE
while (x < input.length):
if (input[x].lower = "a"):
input[x] = @
if (input[x].lower = "s"):
input[x] = $
x++
print input
this will increment x, so the next time it loops, it checks the next character, until it has completed them all, then prints the string.
Hope that helps.
Edit: Ah, someone else responded. Oh well.
This post has been edited by lattyware: 23 Feb, 2007 - 03:08 PM