Skip to content

Instantly share code, notes, and snippets.

@aksnell
Created June 4, 2020 13:14
Show Gist options
  • Save aksnell/c02555cd19cf3613bc1e5ed3c308fb62 to your computer and use it in GitHub Desktop.
Save aksnell/c02555cd19cf3613bc1e5ed3c308fb62 to your computer and use it in GitHub Desktop.
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