Author |
Message |
chibitenshi_03
|
Posted: Sun Feb 01, 2004 9:04 pm Post subject: Changing letters help ASAP!!! |
|
|
This is program that changes the letters from a to b and b to c and so on. How can i change the program to make the the outputted letters on one line istead of having it each letter on one line? Also how can i make it using the getch command?
var word : string
loop
put "Enter the word:" ..
get word
for x : 1 .. length (word)
if word (x) >= "a" and word (x) <= "z" then
put chr (ord (word (x)) + 1)
end if
end for
end loop |
|
|
|
|
|
Sponsor Sponsor
|
|
|
Paul
|
Posted: Sun Feb 01, 2004 9:13 pm Post subject: (No subject) |
|
|
code: |
var word: string
put "Enter the word: "..
get word
put ""
for x : 1 .. length (word)
if ord (word (x)) >= ord ("a") and ord (word (x)) <= ord("z") then
put chr (ord (word (x)) + 1)..
end if
end for
|
You missed some things, dunno if its only the post, and I got rid of the loop.
To put stuff after another, just use".."
Hey, i can acutually help!
What do you mean by getch? you mean only change one letter?
then
code: |
var word: string (1)
put "Enter the word: "..
getch (word)
put ""
if ord (word) >= ord ("a") and ord (word) <= ord("z") then
put chr (ord (word) + 1)..
end if
|
|
|
|
|
|
|
Cervantes
|
Posted: Sun Feb 01, 2004 9:17 pm Post subject: (No subject) |
|
|
um, why would you want to use getch? you couldn't imput a word if you used getch.
are you trying to error proof it? |
|
|
|
|
|
Paul
|
Posted: Sun Feb 01, 2004 9:18 pm Post subject: (No subject) |
|
|
probably its an assignment that needs to use getch? |
|
|
|
|
|
chibitenshi_03
|
Posted: Sun Feb 01, 2004 9:21 pm Post subject: (No subject) |
|
|
how do i change it to use the getch command? |
|
|
|
|
|
Paul
|
Posted: Sun Feb 01, 2004 9:25 pm Post subject: (No subject) |
|
|
You mean with a whole word using getch? Whats the point of that? |
|
|
|
|
|
chibitenshi_03
|
Posted: Sun Feb 01, 2004 9:28 pm Post subject: (No subject) |
|
|
umm nevermind with the getch command thing i figured it out thanks for the help anywayz! ^^ |
|
|
|
|
|
|