/*WAP to display Fibonacci series*/
#include<stdio.h>
#include<conio.h>
void main()
{
int i,a=0,b=1,c;
scanf("%d",&n);
printf("%d\n%d",a,b);
for(i=0;i<n;i++)
{
c=a+b;
a=b;
b=c;
printf("\n%d",c);
}
getch();
}
The sunflower plant displays the Fibonacci sequence in the arrangement of its seeds within its seed head. The seeds are arranged in two interconnecting spirals, with their numbers typically following the Fibonacci sequence.
Exactly what do you mean by 'C program in Java'
class Program { static void Main(string[] args) { int n1, n2, n3,i; n1 = 0; n2 = 1; for (i = 1; i <= 20; i++) { n3 = n1 + n2; if (n3 <= 200) { Console.WriteLine(n3); n1 = n2; n2 = n3; } } Console.ReadKey(); } }
//to generate Fibonacci series upto a range of 200....(in C).... #include<stdio.h> main() { int a,b,c,i; a=0; b=1; printf("\n FIBONACCI SERIES .....\t"); i=1; while(i<=(200-2)) { c=a+b; printf("\t%d",c); a=b; b=c; i++; } }
You mean you have written a program, but you don't understand it? Well, how could I explain it without seeing it?
youtube
see the program
There is the Fibonacci sequence but what is the Fibonacci code?
A screen (VDU).
title bar
Write a program which displays digital watch on the screen, after taking the hours and minutes from the user.
i dn't know. haha