The Rainfall Problem

At Yale University in the 1980s, Elliot Soloway gave the same assignment regularly in his Pascal programming class [Soloway et al. 1983]: Write a program that repeatedly reads in positive integers, until it reads the integer 99999. After seeing 99999, it should print out the average. Called “The Rainfall Problem,” it became one of the most studied problems in the early years of computing education research.

In [1]:
a = raw_input()
1