Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 help me!
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
baby girl




PostPosted: Tue Dec 10, 2002 9:31 am   Post subject: help me!

write a program to output the first and last letters of a series of words. a sample execution window might be

ex.enter word :pig
PG
enter word :dog
dg
Sponsor
Sponsor
Sponsor
sponsor
Tony




PostPosted: Tue Dec 10, 2002 12:11 pm   Post subject: (No subject)

its all about string selection.

text(index) where index is the integer of what letter to put. so
text(1) will put first letter and text(*) will put last letter.

text(2..*-1) will put everything but 1st and last
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
baby girl




PostPosted: Fri Dec 13, 2002 10:45 am   Post subject: (No subject)

i get the t(1) and the(*)
by everytime i put to run there is a error
can you just post the code
thank hun
Tony




PostPosted: Fri Dec 13, 2002 2:41 pm   Post subject: (No subject)

code:

get text
put text(1), " ", text(*)
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
Display posts from previous:   
   Index -> Programming, Turing -> Turing Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 4 Posts ]
Jump to:   


Style:  
Search: