############################################################################ # # File: delta.icn # # Subject: Program to list differences between successive numbers # # Author: Ralph E. Griswold # # Date: January 22, 1999 # ############################################################################ # # This file is in the public domain. # ############################################################################ # # This program reads a stream of numbers from standard input and write # a stream of their first differences to standard output. # ############################################################################ procedure main() local i, j i := read() | exit() while j := read() do { write(j - i) i := j } end