summaryrefslogtreecommitdiffstats
path: root/016.bc
diff options
context:
space:
mode:
Diffstat (limited to '016.bc')
-rw-r--r--016.bc10
1 files changed, 10 insertions, 0 deletions
diff --git a/016.bc b/016.bc
new file mode 100644
index 0000000..1d30fd9
--- /dev/null
+++ b/016.bc
@@ -0,0 +1,10 @@
+#!/usr/bin/bc
+
+scale = 0
+total = 0
+num = 2^1000
+while (num > 0) {
+ total += num % 10
+ num = num / 10
+}
+total