Lab Record Program No 6

 6.Write a C Program to print the Fibonacci Series. 

#include<stdio.h>

#include <conio.h>

void main() 

{

 int a=0, b=1, c, i=1; 

printf("\n %d\t%d\t", a,b); 

do

 { 

c=a+b; 

printf("%d\t",c); a=b; b=c; i++;

 } while(i<=10); 

getch();

 }

Comments

Popular posts from this blog