Created
June 4, 2020 13:14
-
-
Save aksnell/c02555cd19cf3613bc1e5ed3c308fb62 to your computer and use it in GitHub Desktop.
This file contains hidden or 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.Linq; | |
namespace Solution | |
{ | |
public static class Program | |
{ | |
public static int findSum(int n) | |
{ | |
return Enumerable.Range(1, n).Where(x => x % 5 == 0 || x % 3 == 0).Sum(); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment