EASY 2 LEARN 'C'
Home
DotNet
Thursday, 30 August 2012
program for fibonacci series
Program for Fibonacci series
#include<stdio.h>
main()
{
int a,b,c,i;
clrscr();
a=0;
b=1;
printf("fibonacci series is\n:%d\t%d\t",a,b);
for(i=0;i<5;i++)
{
c=a+b;
a=b;
b=c;
printf("\t%d",c);
}
getch();
}
output
:- 0 1 1 2 3 5 8
0 comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
Search Box
'C' Language
'C' Programming
(27)
Arrays in 'C'
(5)
Interview Que's about 'C'
(8)
Strings in 'C'
(4)
Popular Posts
'C' interview questions
'C' Interview Questions * Without using (;)semicolon print the message? Ans...
Logical Interview Questions
Logical Interview Questions ...
switch statement program
Switch statement program #include<stdio.h> main() { in...
Logical Interview Questions2
Logical Interview Questions There are three boxes with fruits: one box with apples, one bo...
switch statement
Switch statement Switch is a keyword,it is used to create attractive interaction betwe...
One dimensional array example 2
One dimensional array example /* program to calculate sum of 10 numbers in an array */ #inc...
program for fibonacci series
Program for Fibonacci series #include<stdio.h> main() { int a,b,c,i; clrscr(); a=0; b=1; printf("fibo...
Two dimensional array
Two dimensional Array Two dimensional array syntax ...
your tiny steps towards programming
Your tiny steps towards programming Programming Language is divided in to two types. > ...
nested if-else condition
Nested if-else Condition It is used for comparision between more than two varia...
0 comments:
Post a Comment