answersLogoWhite

0

What else can I help you with?

Continue Learning about Engineering

Can you explain the program of Fibonacci series in c?

You mean you have written a program, but you don't understand it? Well, how could I explain it without seeing it?


Write a java program to print the last digit in Fibonacci series?

Just generate the Fibonacci numbers one by one, and print each number's last digit ie number%10.


Do Fibonacci Series program in dot net?

public static int fib(int n) {return fib(n-1) + fib(n-2);}


Write a java program to generate the Fibonacci Series using for loop?

class Fibonacci { public static void main(String args[]) { System.out.println("enter the number upto u want"); int number=Integer.parseInt(args[0]); int a=0,b=1,c=0; System.out.print(a+" "+b); for(int i=1;i<=number;i++) { c=a+b; System.out.print(c+" "); a=b; b=c; } } } the number are given to the run time where are print the series eg: 5 0 1 1 2 3 5 8 13................


Write a program to print the Fibonacci series in php upto input value using recursive function?

The Fibonacci sequence uses recursion to derive answers. It is defined as: F0 = 0 F1 = 1 Fn = F(n - 1) + F(n -2) To have this sequence printed by a php script use the following: function fibonacci($n) { if($n 1) return 1; //F1 else return fibonacci($n - 1) + fibonacci($n - 2); //Fn } This recursive function will print out the Fibonacci number for the integer n. To make it print out all the numbers in a particular set add this to your script. for($i = 0; $i < 15; $i++) { echo fibonacci($i) . "<br />"; } So your final result would look like. <?php function fibonacci($n) { if($n 1) return 1; else return fibonacci($n - 1) + fibonacci($n - 2); } for($i = 0; $i < 15; $i++) { echo fibonacci($i) . "<br />"; } ?>

Related Questions

Is 20 a Fibonacci number?

20 is not a term in the Fibonacci series.


What is the 100th number in the Fibonacci series?

It is 354224848179261915075.


What is Fibonacci number series?

A Fibonacci number series is like the example below, 1,1,2,3,5,8,13,21,34,55,89,144,233,377,610...... and so on in general Fibonacci numbers are just the previous two numbers added together starting with 1 and 0 then goes on forever.


What is the next number in the Fibonacci series?

The sum of the previous two numbers in the series.


Write a c program Fibonacci series using for loop in java?

Exactly what do you mean by 'C program in Java'


How would one describe a Fibonacci number?

A Fibonacci number, Fibonacci sequence or Fibonacci series are a mathematical term which follow a integer sequence. The first two numbers in Fibonacci sequence start with a 0 and 1 and each subsequent number is the sum of the previous two.


What is the 10th number of a Fibonacci series starting at 1?

1,1,2,3,5,8,13,21,34,55


1.Write a c program for Fibonacci series?

/*program to calculate factorial of a number*/ #include<stdio.h> #include<conio.h> void main() { long int n; int a=1; clrscr(); printf("enter the number="); scanf("%ld",&n); while(n>0) { a*=n; n--; } printf("the factorial is %ld",a); getch(); }


Can you explain the program of Fibonacci series in c?

You mean you have written a program, but you don't understand it? Well, how could I explain it without seeing it?


Write a java program to print the last digit in Fibonacci series?

Just generate the Fibonacci numbers one by one, and print each number's last digit ie number%10.


Is 1 the first number in the Fibonacci sequence?

According to the link, zero is the first number in the series.


Program to generate Fibonacci series using storage class in c plus plus?

i dn't know. haha