Fibonacci sequence: Difference between revisions

Content added Content deleted
Line 3,606: Line 3,606:
=== Iterative ===
=== Iterative ===
<syntaxhighlight lang="csharp">
<syntaxhighlight lang="csharp">
using System; using System.Text; // Fibrus.cs Russia
using System; using System.Text; // FIBRUS.cs Russia
namespace Fibrus { class Program { static void Main()
namespace Fibrus { class Program { static void Main()
{ long fi1=1; long fi2=1; long fi3=1; int da; int i; int d;
{ long fi1=1; long fi2=1; long fi3=1; int da; int i; int d;
for (da=1; da<79; da++)
for (da=1; da<=78; da++) // rextester.com/MNGUV70257
{ d = 20-Convert.ToInt32((Convert.ToString(fi3)).Length);
{ d = 20-Convert.ToInt32((Convert.ToString(fi3)).Length);
for (i=1; i<d; i++) Console.Write(".");
for (i=1; i<d; i++) Console.Write(".");