projects
/
mono.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
[Mono.Profiler.Log] Support MLPD version 13
[mono.git]
/
mcs
/
tests
/
test-729.cs
1
using System;
2
3
namespace Primes
4
{
5
class MainClass
6
{
7
public static int Main ()
8
{
9
const ulong max = 5;
10
bool[] numbers = new bool[max];
11
12
for (ulong i = 0; i < max; i++)
13
numbers[i] = true;
14
15
for (ulong j = 1; j < max; j++)
16
for (ulong k = (j + 1) * 2; k < max; k += j + 1)
17
numbers[k] = false;
18
19
for (ulong i = 0; i < max; i++)
20
if (numbers[i])
21
Console.WriteLine (i + 1);
22
23
return 0;
24
}
25
}
26
}