1. Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members.

anyone good with PIPPIN??

Discussion in 'Random Discussion' started by BenWasTaken, Oct 13, 2003.

  1. BenWasTaken

    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???
     
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 733,556 other people just like you!

Loading...

Short URL to this thread: https://techguy.org/171572

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice