From 2fc6f19889b3a2d0a1d2c28706a488e6206983ae Mon Sep 17 00:00:00 2001 From: Jesse Luehrs Date: Thu, 14 May 2009 20:16:37 -0500 Subject: problem 16 solution --- 016.bc | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 016.bc (limited to '016.bc') 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 -- cgit v1.2.3-54-g00ecf