We want to leave college if the time is after 5pm.

Rewrite these IF statements so that they are more compact.


IF ( time is 9am ) THEN 
	stay in college 
ElseIf ( time is 10am ) THEN 
	stay in college 
ElseIf ( time is 11am ) THEN 
	stay in college 
ElseIf ( time is 12am ) THEN 
	stay in college 
ElseIf ( time is 1pm ) THEN 
	stay in college 
ElseIf ( time is 2pm ) THEN 
	stay in college
ElseIf ( time is 3pm ) THEN 
	stay in college
ElseIf ( time is 4pm ) THEN 
	stay in college
ElseIf ( time is 5pm ) THEN 
	leave college
Hosted by www.Geocities.ws

1