find how many digits in 7542th Fibonacci no

Posted by Omniitstudent under C# on 2/15/2012 | Points: 10 | Views : 787 | Status : [Member] | Replies : 1
one of my fellow wanted a program to find how many digits in 7542th Fibonacci no
find how many digits in 7542th Fibonacci no

plz help me

omprakash


Responses

Posted by: Venkateswari on: 2/15/2012 [Member] Starter | Points: 25

Up
0
Down
   long f1 = 1;

long f2 = 2;
long f3 = 0;
f3 = f1 + f2;
for (int i = 0; i <= 7542; i++)
{
textBox1.Text = f3.ToString() ;
f1 = f2;
f2 = f3;
f3 = f1 + f2;
}
[Note] In this code the digits present in 7542 Fibonacci series are 19 digits [/Note]

Venkateswari

Omniitstudent, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response