View Single Post
  #1   Spotlight this post!  
Unread 14-02-2007, 20:09
brennerator brennerator is offline
Registered User
#1560
 
Join Date: Jan 2005
Location: Silicon Valley
Posts: 75
brennerator is an unknown quantity at this point
RAndom C++ Problem

#include <iostream>
using namespace std;

int main()
{
int a,b,c,d;
b=0;
c=1;
d=1;
cout << "Which Fib do you want to find?";
cin >> a;
do
{
cout << c << endl;
c = c + d;
cout << d << endl;
d = c + d;
b++;
}
while (b<a)
cout << "And those are the fibs" << endl;
}

Any help?