View Single Post
Old 10-04-2007, 03:43 PM   #1 (permalink)
natelowery
Recruit
 
Join Date: Sep 2007
Posts: 2
natelowery is on a distinguished road
need help with code for Fibonacci numbers

I am trying to write a program that displays the first 10 Fibonacci numbers when executed. The code should look like this:

//Ch7AppE10.cpp – displays the first 10 Fibonacci numbers
//Created/revised by <your name> on <current date>

#include <iostream>

using std::cout;
using std::endl;

int main()
{


return 0;
} //end of main function

It should be done with a "for" statement. Please help.
natelowery is offline   Reply With Quote