Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

Fibonacci Series Generator C Program, Exercises of Computer Engineering and Programming

This c program generates and prints the first 20 numbers in the fibonacci series. The series is a sequence of numbers in which each number is the sum of the two preceding ones, starting from 0 and 1.

Typology: Exercises

2011/2012

Uploaded on 07/28/2012

dewansh
dewansh 🇮🇳

4.4

(10)

92 documents

1 / 1

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
6
#include<stdio.h>
#include<conio.h>
void main (void)
{
int count,a=0,b=1,c;
clrscr();
printf ("The Fibonacci Series to the given range is:\n");
for (count=1;count<=20;count++)
{
c=a+b;
b=a;
a=c;
printf ("%d\n",c);
}
getch();
}
Series
docsity.com

Partial preview of the text

Download Fibonacci Series Generator C Program and more Exercises Computer Engineering and Programming in PDF only on Docsity!

#include<stdio.h> #include<conio.h> void main (void) { int count,a=0,b=1,c; clrscr(); printf ("The Fibonacci Series to the given range is:\n"); for (count=1;count<=20;count++) { c=a+b; b=a; a=c; printf ("%d\n",c); } getch(); }

Series

docsity.com