
C#
24
Вклад в тег
var numberList = Enumerable.Range(100, 999).ToList();
int sum = 0;
for (int n = x; n > 0; sum += n % 10, n /= 10);
var numberList = Enumerable.Range(100, 999).ToList();
var result = numberList.Select(x =>
{
int sum = 0;
for (int n = x; n > 0; sum += n % 10, n /= 10);
return sum;
});
;
[JsonProperty("some.field.dot-net")]
public string SomeFieldDotNet { get; set; }