/*	Program: 	~cs/second_if.cpp					9/13/01
	Author:		John Howell									Drawer 76
	Purpose:	To discuss alternative formats
*/

#include <iostream.h>
using namespace std;

int main ( )
{


	int age, value;
	
// If there is only one option, {}'s may be omitted.

	cout << "Enter your age: " ;
	cin  >> age;
	
	if (age > 16)
		cout << "You're old enough to drive.  Do you have a licence?\n";
	else
		cout << "Where's a good bicycle shop in Richmond?" << endl;
	cout << endl;	
	
	cout << "Welcome to Smidley's, where the we check ID's.  ";
	cout << "How old are you? " ;
	cin  >> age;
	
	if (age <= 21)
		cout << "Sorry, you're too young to be here legally." << endl;
	else
		cout << "Glad to see you again." << endl;
		cout << "What can I get you?  Grosch is on tap tonight\n";
		
	cout << "Oh, hello officer.  I didn't see you there." << endl<<endl;
	
	cout <<"Robbin' Hood takes from the rich and gives to the poor.\n";
	
// In particular, if you have less than $20, it will give you 5;
//	if you have $20 or more, it will take away 6.

	cout << "How much money do you have? ";
	cin  >> value;
	
	if (value < 20) 
	{
		value = value + 5;
	}
    if (value >= 20)
	{
		value = value - 6;
	}
	
	cout << " You now have $"<< value << endl << endl;
	return 0;
}
	
	
	
	

