# # See ../README.md # # # Run as: bc ch-1.bc < input-file # # Terminate the input with 0 # while (1) { n = read () if (n == 0) {break} (s += n) / ++ c }