projects
/
mono.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
* verify.c: Fixed pointer type handling, some code and message formating and two...
[mono.git]
/
mono
/
tests
/
test-prime.cs
1
using System;
2
3
class Test {
4
public static bool testprime (int x) {
5
if ((x & 1) != 0) {
6
for (int n = 3; n < x; n += 2) {
7
if ((x % n) == 0)
8
return false;
9
}
10
return true;
11
}
12
return (x == 2);
13
}
14
15
public static int Main () {
16
if (!testprime (17))
17
return 1;
18
return 0;
19
}
20
}