diff options
Diffstat (limited to '')
-rw-r--r-- | mat/domace_naloge/2/d=nx.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/mat/domace_naloge/2/d=nx.c b/mat/domace_naloge/2/d=nx.c new file mode 100644 index 0000000..8f91387 --- /dev/null +++ b/mat/domace_naloge/2/d=nx.c @@ -0,0 +1,13 @@ +#include <stdio.h> +long long unsigned int d(long long unsigned int n) { return (n*(n-3))/2; } +long long unsigned int x(long long unsigned int n) { return (n/2)-(3/2); } +int main() { + long long unsigned int n = 3; + while (n < 420696969) { + if (d(n) != n*x(n)) { + fprintf(stdout, "%lld-kotnik! d(n)=%lld, x(n)=%lld, n*x=%lld\n", n, d(n), x(n), n*x(n)); + } + n = n+2; + } +} + |