The George Washington University
School
of Engineering and Applied Science
Department of Computer Science

CSci 51 -- Introduction to Computing – Spring 2002

Lab #6
Feb. 28 & March 1

This exercise will help create a file for input and use it in program. You will be creating a program that reads a file containing name, sex, and birthday information for 3 people.

 

Get the name and birthday of the people sitting on either side of you. The name should be exactly 10 characters long, sex entered at M or F, and birth date entered as month number (1-12), day number (1-31), year number (yyyy).

 

Your input file should look like this:

 

David     M 12/31/1979

Alice     F 11/24/1976

William   M 3/28/1977

 

Your output should look like this:

 

The person to your left is David     . His birthday is 12-31-1979.

Your name is Alice     . Your birthday is 11-24-1976.

This person to your right in William   . His birthday is 3-27-1977.