1
unknown
plain_text
3 years ago
516 B
11
Indexable
using System;
namespace FibonacciSum
{
class Program
{
static void Main(string[] args)
{
long sum = 0;
long a = 1;
long b = 2;
while (b < 4000000000)
{
if (b % 2 == 0)
{
sum += b;
}
long c = a + b;
a = b;
b = c;
}
Console.WriteLine("Sum: " + sum);
}
}
}
Editor is loading...