using System; using System.Collections.Generic; using System.Text; namespace Euler1 { // Add all the natural numbers below one thousand that are multiples of 3 or 5. class Program { static void Main(string[] args) { long sum = 0; for(int i=0;i<1000;++i) { if( (i % 3 == 0) || (i % 5 == 0) ) sum += i; } Console.WriteLine("sum of all the multiples of 3 or 5 below 1000: " + sum); } } }