Friday 23, June 2017
Welcome Guest, Register | Login  
      Home    |    Tutorials    |    Free Ebooks    |    Free Scripts    |    Articles    |    Blog     |    About Us    |    Contact Us

  Print fibonacci series using c language

Here is a c language program which will take number of terms as input from user and prints the fibonacci series using c language loops.
Cut & Paste Script
#include<stdio.h>
 
main()
{
   int n, first = 0, second = 1, next, c;
 
   printf("Enter the number of terms\n");
   scanf("%d",&n);
 
   printf("First %d terms of Fibonacci series are :-\n",n);
 
   for ( c = 0 ; c < n ; c++ )
   {
      if ( c <= 1 )
         next = c;
      else
      {
         next = first + second;
         first = second;
         second = next;
      }
      printf("%d\n",next);
   }
 
   return 0;
}
 
   
     RELATED SCRIPTS
 
concatenate two strings c language
Here is an example code to concatenate two strings using clanguage....more »
Category : C Programs Hits : 3184
   
pointer and there uses in c
Example code for pointer and there uses in c language....more »
Category : C Programs Hits : 1829
   
Bubble sort using c language
This program will sort an array using bubble sort in c language. c program for bubble sort, bubble sort in c, sorting an array using bubble sort in c language....more »
Category : C Programs Hits : 3323
   
C Program to Reverse an array
Here is a program which will take input from user in array and will reverse it using c language....more »
Category : C Programs Hits : 1691
   
Find a substring in another string using c
This program will input a string and a substring and than check whether the substring is present is string or not....more »
Category : C Programs Hits : 3356
   
   
SCRIPT CATEGORIES
 
  C Programs
C Programs scripts
  C++ Programs
C++ Programs scripts
  Java Programs
Java Programs scripts
  JavaScript Examples
JavaScript Examples scripts
  PHP Examples
PHP Examples scripts
  VBScript Examples
VBScript Examples scripts
 
 
 
POPULAR E-BOOKS
 
Download Biz Opp Of The Decade Ebook Biz Opp Of The Decade
   
Download Viral Marketing Secrets Ebook Viral Marketing Secrets
   
Download HOW TO GENERATE MASSIVE AMOUNTS OF TRAFFIC ON A SHOESTRING BUDGET Ebook HOW TO GENERATE MASSIVE AMOUNTS OF TRAFFIC ON A SHOESTRING BUDGET
   
Download Blog for Dollar Ebook Blog for Dollar
   
Download Back to Basics Making the Most of Affiliate Marketing  Ebook Back to Basics Making the Most of Affiliate Marketing
   
     
Studiesinn.com 2017 All Rights Reserved.
 
Website Designed & Developed by TechXprtz