anyone good with PIPPIN??

BenWasTaken

Thread Starter
Joined
Sep 14, 2002
Messages
154
im stuck on my comp science homework and really need some help with a couple problems..ill post them hereConsider the following sequence of numbers: (15 points)

1, 1, 2, 3, 5, 8, 13, ...

This is a variation of the Fibonnaci sequence where the first two values are 1 and all other values in the sequence are the sum of the two values in the sequence that immediately precede it. You are to write a Pippin program (call it fib.dat) that when supplied a positive integer in W will compute the Wth Fibonnaci number and place it into Y. For example, if W is set to 4 and the program is run, then when the program halts, Y should have the value 3. Likewise, if a value of 7 is used for W, the value of Y should be 13 after the program halts. Your program may assume that the value in W is at least 1. Your program should work properly for values of W up to 11 (when W is 11, Y should be set to 89). Fibonnaci numbers beyond the 11th one are out of range for Pippin (you may assume that W will be less than 12, but if the program is run with such a value you will simply get a number out of range error at some point in the execution). Place the Pippin program (called fib.dat) on a diskette. Make sure that the diskette is labeled on the outside with your name and section number.

can anyone help???
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 807,865 other people just like you!

Latest posts

Staff online

Top