Chapter 5.4 example

uses scanf routine to accept input