C++ Programs & Stuffz

Nothing like anything!!!

Please Click on ADS!!

Please Click on the above ads given by GOOGLE , so that I can maintain my blog!!

Tuesday, August 31, 2010

Print the nos in the fibonocci series less than 35

//pgm to print the nos in the fibonocci series less than 35
#include<iostream.h>
#include<conio.h>
void main()
{
    int a=0,b=1,c;
   cout<<a<<endl<<b<<endl;
   c=a+b;
   while(c<35)
   {
       cout<<c<<endl;
      a=b;
      b=c;
      c=a+b;
   }
   getch();
}

0 comments:

Post a Comment

free counters