Posts

Showing posts with the label FIBONACCI SERIES

FIBONACCI SERIES

************************************************************************  Write a c program to print Fibonacci series without using recursion and using recursion. Input: 10 Output: 0 1 1 2 3 5 8 13 21 34 ************************************************************************  JAVA Program //import java.util.Date; import java.util.Scanner; public class HelloWorld {     public static void main(String[] args) {         // Date now = new Date();         Scanner sc= new Scanner(System.in);         int x,y,z,n,i;         y=z=0;         x=1;         System.out.println("Enter value of n: ");         n=sc.nextInt();         System.out.println("FIBONACCI SERIES: " );     ...