All pastes #1565890 Raw Edit

ch 3

public text v1 · immutable
#1565890 ·published 2009-09-14 19:36 UTC
rendered paste body
start
	num gallonsOfGasUsed
	num milesTraveled
	num pricePerGallon
	num milesPerGallon
	num costPerMile
	get gallonsOfGasUsed
	get milesTraveled
	get pricePerGallon
	milesPerGallon = milesTraveled / gallonsOfGasUsed 
	costPerMile = pricePerGallon / milesPerGallon
	print milesPerGallon
	print costPerMile
	displayInformation()
stop

displayInfo()
	string MSG1 = " The higher the value,"
	string MSG2 = "the more economical a vehicle is. "
	string MSG3 = "The average mid-size car gets"
	string MSG4 = "27 miles per gallon"
	print MSG1
	print MSG2
	print MSG3
	print MSG4
return