Xref: utzoo sci.math:16733 comp.lang.c:38264 Path: utzoo!utgpu!cunews!bnrgate!brtph3!batpa1!cadnews From: kahhan@bnr.ca Newsgroups: sci.math,comp.lang.c Subject: Re: fibonacci Numbers Keywords: Fibonacci Numbers - routines? Message-ID: <1991Apr15.112458.436@bnr.ca> Date: 15 Apr 91 11:24:58 GMT References: <1991Apr12.051844.15063@milton.u.washington.edu> Sender: kahhan@batpa3 Organization: none Lines: 18 In article <1991Apr12.051844.15063@milton.u.washington.edu> amigo@milton.u.washington.edu (The Friend) writes: > > Can someone send me source code for a routine to calculate >Fibonacci numbers to _x_ (x being input from user)? Additionally it'd >be great if this found the PRIME numbers in the set. It could print its >results as it went through (if that makes it any easier). > Why not just use the equation and calculate the nth number directly? Then you could just embed the equation in a loop (for i=1 to n) and you'll have what you want. -- -------------------------------------------------------------------------------- Larry Kahhan - NRA, NRA-ILA, CSG, GOA, GSSA | The opinions expressed here do lkahhan@bnr.ca | not necessarily represent the | views of the management. --------------------------------------------------------------------------------