-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathProgram.cs
36 lines (30 loc) · 818 Bytes
/
Program.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
using System;
namespace _005
{
class Program
{
static bool Is(int n)
{
for (int i = 1; i < 21; i++)
if (n % i != 0)
return false;
return true;
}
public static int GetAnswer()
{
for (int i = 2520; ; i++)
if (Is(i))
return i;
}
static void Main(string[] args)
{
Console.BackgroundColor = ConsoleColor.White;
Console.ForegroundColor = ConsoleColor.Black;
Console.Clear();
Console.WriteLine("Project Euler. Verloka Vadim, 2019");
Console.WriteLine(new string('-', 50));
Console.WriteLine($"Answer: {GetAnswer()}");
Console.Read();
}
}
}