You are viewing a single comment's thread. Return to all comments →
Seems like cookies are disabled on this browser, please enable them to open this website
Fibonacci Modified
You are viewing a single comment's thread. Return to all 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();
}**