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

Username:   Password: 
 RegisterRegister   
 Help me with this program please.
Index -> Programming, Turing -> Turing Submissions
View previous topic Printable versionDownload TopicRate TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
Brainyprogrammer




PostPosted: Thu Jan 14, 2010 1:28 am   Post subject: Help me with this program please.

Hie! guyzz I dunno whether I POSTED IT ON THE RIGHT FORUM R NOT? kINDLY help me to this one.well,
Write a program to output the first and last letters of a word entered by the user. If the word entered is less than two characters, output the error message ?The word entered has only 1 character.? Use a loop in your program to allow the user to run it continuously until they enter the sentinel ?exit?.

hELP ME TO DO THIS PROGRAM
Sponsor
Sponsor
Sponsor
sponsor
Turing_Gamer




PostPosted: Thu Jan 14, 2010 8:24 am   Post subject: Re: Help me with this program please.

Ya try and post it on the help forum.
BTW, we can't make the program for you but we can guide you.

As for helping you, I don't know every command so it is out of my hands. Counting letters in a word is hard.
Error message is easy
Turing:
var lettercount : int
var word : string

loop
    get word
    %Some program to count letters
    if lettercount <= 1 then
        put "Error, not enough letters"
    end if
end loop
registration




PostPosted: Fri Jan 15, 2010 1:25 pm   Post subject: Re: Help me with this program please.

Turing_Gamer @ Thu Jan 14, 2010 8:24 am wrote:
Ya try and post it on the help forum.
BTW, we can't make the program for you but we can guide you.

As for helping you, I don't know every command so it is out of my hands. Counting letters in a word is hard.
Error message is easy
Turing:
var lettercount : int
var word : string

loop
    get word
    %Some program to count letters
    if lettercount <= 1 then
        put "Error, not enough letters"
    end if
end loop


It's not hard, rather very easy.
Turing:

var word : string
loop
get word
exit when length (word) >2
put "Error message"
end loop

I don't remember correctly if length was the correct command, but please do check turing docs.[/i]
Turing_Gamer




PostPosted: Sun Jan 17, 2010 3:12 pm   Post subject: Re: Help me with this program please.

Oh I didn't know that command. Guess I learned something.
Display posts from previous:   
   Index -> Programming, Turing -> Turing Submissions
View previous topic Tell A FriendPrintable versionDownload TopicRate TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 4 Posts ]
Jump to:   


Style:  
Search: