Pure Programmer
Blue Matrix


Cluster Map

Project: Total Filter (Integer)

Write a filter program that accepts text representations of integer values, one per line, and then computes and prints the total. The program should print an error to STDERR if a line of input can't be parsed as an integer value.

Output
$ node TotalFilterInt.js < ../../data/text/IntegerList1.txt 48541 $ node TotalFilterInt.js < ../../data/text/IntegerList2.txt 49829 $ node TotalFilterInt.js < ../../data/text/IntegerList3.txt 54467

Solution