Created
January 1, 2014 14:48
-
-
Save hnw/8208571 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Linq; | |
using System.Collections.Generic; | |
class Prob1 | |
{ | |
static void Main() | |
{ | |
IEnumerable<int> nums = | |
from num in Enumerable.Range(1, 1000-1) | |
where num % 3 == 0 || num % 5 == 0 | |
select num; | |
System.Console.WriteLine(nums.Sum()); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment