diff options
author | sijanec <sijanecantonluka@gmail.com> | 2020-12-14 00:04:39 +0100 |
---|---|---|
committer | sijanec <sijanecantonluka@gmail.com> | 2020-12-14 00:04:39 +0100 |
commit | ddff09bb8def69d35c43649736dd4c3a5f0aef7f (patch) | |
tree | 776b3e0fa9a05c6feab0b753ed21ab011ff28afd /mat/advent/6/n1.c | |
parent | weekend reading 6 (diff) | |
parent | odstranil dependency za f5ff, domača naloga 20 pri matematiki (diff) | |
download | sola-gimb-2-ddff09bb8def69d35c43649736dd4c3a5f0aef7f.tar sola-gimb-2-ddff09bb8def69d35c43649736dd4c3a5f0aef7f.tar.gz sola-gimb-2-ddff09bb8def69d35c43649736dd4c3a5f0aef7f.tar.bz2 sola-gimb-2-ddff09bb8def69d35c43649736dd4c3a5f0aef7f.tar.lz sola-gimb-2-ddff09bb8def69d35c43649736dd4c3a5f0aef7f.tar.xz sola-gimb-2-ddff09bb8def69d35c43649736dd4c3a5f0aef7f.tar.zst sola-gimb-2-ddff09bb8def69d35c43649736dd4c3a5f0aef7f.zip |
Diffstat (limited to 'mat/advent/6/n1.c')
-rw-r--r-- | mat/advent/6/n1.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/mat/advent/6/n1.c b/mat/advent/6/n1.c new file mode 100644 index 0000000..4f4a5a2 --- /dev/null +++ b/mat/advent/6/n1.c @@ -0,0 +1,14 @@ +#include <stdio.h> +#include <stdlib.h> +int main (int argc, char ** argv) { + unsigned int s = 1; /* seštevek */ + unsigned int i = 0; /* indeks */ + while (1) { + i++; + s = s*3; + if (s > 2020) + break; + } + fprintf(stdout, "H_%u ima ploščino, enako %u-kratniku ploščine H_0.\n", i, s); + return 0; +} |