add c version of some tests
This commit is contained in:
parent
037c716b65
commit
116f35a44a
3 changed files with 50 additions and 0 deletions
13
proto/ctests/psum.c
Normal file
13
proto/ctests/psum.c
Normal 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;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue