summaryrefslogtreecommitdiffstats
path: root/šola/p2/dn/DN01b_63230317.c
diff options
context:
space:
mode:
Diffstat (limited to 'šola/p2/dn/DN01b_63230317.c')
-rw-r--r--šola/p2/dn/DN01b_63230317.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/šola/p2/dn/DN01b_63230317.c b/šola/p2/dn/DN01b_63230317.c
new file mode 100644
index 0000000..cebcc83
--- /dev/null
+++ b/šola/p2/dn/DN01b_63230317.c
@@ -0,0 +1,24 @@
+#include <stdio.h>
+void printInt (int a) {
+ if (a < 0) {
+ a = -a;
+ putchar('-');
+ }
+ int števke[29];
+ int len = 0;
+ while (a > 0) {
+ števke[len++] = a%10;
+ a /= 10;
+ }
+ for (int i = len-1; i >= 0; i--)
+ putchar('0'+števke[i]);
+}
+int main (void) {
+ while (getchar() == '0');
+ int po_prvi_enici = 0;
+ while ((getchar() & ~1) == '0')
+ po_prvi_enici++;
+ printInt(++po_prvi_enici);
+ putchar('\n');
+ return 0;
+}