next up previous contents
Next: Solution Up: Input and Output Previous: Solution

 

Formatted File IO

A file personnel.dat contains records of people's name (up to 15 characters), age (3 digit integer), height (in metres to the nearest centimetre), telephone number (4 digit integer). Write a program to read the file and print out the details in the following format:

                                Height   
          Name          Age    (metres)    Tel. No.
          ----          ---     ------     --------
       Bloggs J. G.      45      1.80        3456
       Clinton P. J.     47      1.75        6783
       etc.

Go back to Notes gif




next up previous contents
Next: Solution Up: Input and Output Previous: Solution

©University of Liverpool, 1997
Thu May 29 10:11:26 BST 1997
Not for commercial use.