add c version of some tests

This commit is contained in:
Quentin Carbonneaux 2015-07-10 03:16:39 -04:00
parent 037c716b65
commit 116f35a44a
3 changed files with 50 additions and 0 deletions

13
proto/ctests/psum.c Normal file
View file

@ -0,0 +1,13 @@
long f() {
long n, n0, s;
s = 0;
n = 1234567;
for (;;) {
n0 = n - 1;
s = s + n;
if (!n0) break;
n = n0;
}
return s;
}