Need help in number sequencing...
Author |
Message |
chocolate thunda
|
Posted: 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  |
|
|
|
|
 |
Sponsor Sponsor

|
|
 |
omni

|
Posted: 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
|
Posted: 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.  |
|
|
|
|
 |
s_climax
|
|
|
|
 |
chocolate thunda
|
Posted: Thu May 13, 2004 8:28 pm Post subject: (No subject) |
|
|
I already saw that and it doesn't work |
|
|
|
|
 |
|
|