Switch to full style
For C/C++ coders discussions and solutions
Post a reply

how to write a "c' program on fibannoic series

Sun Jan 08, 2012 9:09 am

hai.


how to write a "c" program based on fibannoic series



Re: how to write a "c' program on fibannoic series

Thu Jan 12, 2012 8:13 pm

Code:
/*fibannoic seriesi*/
main()
{
int f1=1,f2=1,terms,f3,i;
clrscr();
printf("enter the number of terms u want in series \n");
scanf("%d",&terms);

printf("%d %d ",f1,f2);

for(
i=0i<terms-;i++)
{
f3=f1+f2;
printf(" %d ",f3);
f1=f2;
f2=f3;
}
getch();


Re: how to write a "c' program on fibannoic series

Sat Jan 14, 2012 6:49 pm

Code:
#include<stdio.h>
#include<conio.h>
 
void main()
{
   
int a=0,b=1,c,i;
   
clrscr();
   
printf("%d\t%d",a,b);
   for(
i=1;i<=8;i++)
   {
     
c=a+b;
     
printf("%d\t",c);
     
a=b;
     
b=c;
  }
 
getch();


Post a reply
  Related Posts  to : how to write a "c' program on fibannoic series
 Program for "Selection of arithmetic operations" in Java     -  
 Write a program in C++     -  
 write a program in c++ for the following...     -  
 how to write interface program     -  
 How to write a JSP Program to manipulate Last Date visited     -  
 Make your own Visual Basic 6 Version of "Tail for windows"     -  
 Temu Coupon Code $100 off |"|act796165|"| for New and Exis     -  
 How to save in a file the ASCII Characters? Like "☺"     -  
 Invalid unicode sequence error ("u")     -  
 help for "Note pad code in java"     -