Advertisement
jbjares

FibonacciReverse

Aug 21st, 2015
392
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.34 KB | None | 0 0
  1. package com.jbjares.dynamicProgramming;
  2.  
  3. public class Fibonacci {
  4.    
  5.  
  6.     public static void main(String[] args) {
  7.         new Fibonacci().calc(317811,1);
  8.     }
  9.    
  10.     public void calc(Integer start,Integer end){
  11.             Integer f = (int) (start/((1+Math.sqrt(5))/2));
  12.             System.out.println(f);
  13.             if(f==end){
  14.                 return;
  15.             }
  16.             calc(++f,end);
  17.     }
  18.  
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement