Dana Vrajitoru
C101 Computer Programming

Lab 7

Date: Thursday, March 11, 2004.

Write a program that asks their user for their age, and then tells them if they are allowed to have a driver license and if they are allowed to buy alcohol. In the end the program should print message that tell the user not to drink and drive.

In this program, include 3 functions, one for each of the 3 messages: that they are allowed to have a driver's license, that they are allowed to purchase alcohol, and not to drink and drive. All of these functions should not return any value, thus having the return type void, and should not take any parameters. Place all of them in front of the main after the #include statements (see handout).

The example from class.

Send me: Source code file containing three examples of program execution for each of the possible cases.