2021-04-30 06:49:35 +00:00
|
|
|
struct Program
|
|
|
|
{
|
|
|
|
static Main(): int
|
|
|
|
{
|
2021-04-30 07:50:35 +00:00
|
|
|
sum: int = 0;
|
2021-04-30 06:49:35 +00:00
|
|
|
|
2021-04-30 19:17:44 +00:00
|
|
|
for (i: int in [1..999])
|
2021-04-30 06:49:35 +00:00
|
|
|
{
|
|
|
|
if ((i % 3 == 0) || (i % 5 == 0))
|
|
|
|
{
|
|
|
|
sum = sum + i;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-04-30 19:17:44 +00:00
|
|
|
Console.PrintLine("%i", sum);
|
|
|
|
return 0;
|
2021-04-30 06:49:35 +00:00
|
|
|
}
|
|
|
|
}
|