summaryrefslogtreecommitdiffstats
path: root/mat/advent/0.c
diff options
context:
space:
mode:
Diffstat (limited to 'mat/advent/0.c')
-rw-r--r--mat/advent/0.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/mat/advent/0.c b/mat/advent/0.c
new file mode 100644
index 0000000..26b9753
--- /dev/null
+++ b/mat/advent/0.c
@@ -0,0 +1,16 @@
+#include <stdio.h>
+#include <stdlib.h>
+int šp (int število, int prafaktor) {
+ int vrni = 0;
+ while (!(število % prafaktor)) {
+ vrni++;
+ število /= prafaktor;
+ }
+ return vrni;
+}
+int main (void) {
+ int število = 0;
+ for (int i = 1; i < 100; i++)
+ število += šp(i, 7);
+ printf("%d\n", število);
+}