• + 0 comments
    • static String fibonacciModified(int t1, int t2, int n) { BigInteger c=new BigInteger("0"); BigInteger a=new BigInteger(t1+""); BigInteger b=new BigInteger(t2+""); for (int i=0;i { c=a.add(b.multiply(b)); a=b; b=c; } return c.toString(); }** I hope this will help you