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

Username:   Password: 
 RegisterRegister   
 Need help in number sequencing...
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
chocolate thunda




PostPosted: Thu May 13, 2004 7:54 pm   Post subject: Need help in number sequencing...

My teacher asked me to create a program that puts numbers in this sequence up to 20 digits:
1,1,2,3,5,8,13...
You basically add the two previous number to get the third one.
I have tried for hours but was unnable to create the program, I was wandering if there is someone smart enough to help me...

Thank You Wink
Sponsor
Sponsor
Sponsor
sponsor
omni




PostPosted: Thu May 13, 2004 8:08 pm   Post subject: (No subject)

why don't you post an attempt of your code, or attach it as a file so then people will know what part of your program that you need help on. No one is going to do the programming for you.
chocolate thunda




PostPosted: Thu May 13, 2004 8:25 pm   Post subject: (No subject)

What I tried goes something like this:

var s:int
put "Enter the number that you want to go up to:"
get s
put s

...this is the part where I don't know what to do.
I have no idea how to add the two previous numbers to get to the third one... and go on for up tp 20 digits.
This is where I need someone to help me. Sad
s_climax




PostPosted: Thu May 13, 2004 8:26 pm   Post subject: (No subject)

http://www.compsci.ca/v2/viewtopic.php?t=4944
chocolate thunda




PostPosted: Thu May 13, 2004 8:28 pm   Post subject: (No subject)

I already saw that and it doesn't work
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  [ 5 Posts ]
Jump to:   


Style:  
Search: