From 74f4e1c44ae340377c395b1d467b70363f060c64 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Anton=20Luka=20=C5=A0ijanec?= Date: Fri, 2 Dec 2022 17:20:17 +0100 Subject: =?UTF-8?q?knji=C5=BEnica?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- mat/advent/0.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 mat/advent/0.c (limited to 'mat') 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 +#include +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); +} -- cgit v1.2.3