c-record -1) fibonacci series

 #include<stdio.h>

#include<conio.h>    

void main()    

{    

int i,j,f,n,k; 

clrscr();

printf("Enter the number of elements I , J : ");    

scanf("%d%d",&i,&j);    

printf("\nenter the value N : ");

scanf("%d",&n);

for(k=2;k<n;k++)

{    

f=i+j;

printf(" %d ",f);    

i=j;

j=f;    

}  

getch();  

}    


output:- note enter the numeber of elements   i=0,j=1

1) output:-

alt  +f9   ------   run and

ctrl+f9   ------  compile




Comments

Popular posts from this blog

digital marketing ppt-u1

SOFTWARE

cn lab

Computer Operations and Performing - D L Unit-1-1

DS-Record-mca-04) write a program for evaluating a given postfix expression using stack.

Unit 2: Foundations of Ownership, Security Related Concepts in Blockchain

Unit-1 Foundations of Software Systems and Blockchain

Access the Internet to Browse Infromation & E-Mail Operation- D L Unit-2-1

DBMS Degree Lab Records

6)what are the various service of internet and protocols ICT-unit-1