Thursday, November 7, 2019

Write a program to print the fibonacci series for given "N" value.
#include<stdio.h>
#include<conio.h>
void main()
{
int n,t1=0,t2=1,next;
clrscr();
printf("enterthe no");
scanf("%d",&n);
printf("\n\n7%d%d",t1,t2);
 next=t1+t2;
 while(next<=n){
 printf("\n%d",next);

t1=t2;
t2=next;
next=t1+t2;

}
getch();

}

No comments:

Post a Comment

2004 1.       A.   True or false:- 1.       The part of the computer that executes program instruction known as memory.- False 2.  ...