Shane Partridge Mathematics
Basic Computer Programming Language
The Program Function is executed by Two Gosub Routine Functions
1st Function on Line [15] Calculus Routine for Fuel Rate per 100km Consumption
The Return Function Line [25]
2nd Function on Line [26] Calculates the Fuel Litre Consumption of any Given distance Calculated.
The Return Function Line [28]
Line [2 to 9] Identifies the Variables needed for Calculus
Line [13] The Program asks for the Fuel Tank Capacity and Inputs the Value into [FC]
Line [14] The Program asks for the Distance Travelled on The Tanks Full Capacity and Inputs the Value into [DT]
Line [15] The Gosub Routine Calculates the Fuel Rate Consumption per 100kms
Once the Fuel Rate Per 100kms is evaluated in the First Subroutine The Second Subroutine Calculates the
Fuel Litre Consumption on any Calculated Route intended.
Line [17] The Program ask for the distance of a Given Route and Inputs that value into Variable [FP]
Line [18] Once the Variable [FP] has been assigned . The Program executes the second Gosub Routine.
Line [26] Distancerate: Subroutine.
Line [28] Returns control to line [19] to Execute the Fuel Litre Consumption on the distance of the given Route.
Note Line [12] Assigns Variable [ TT = 100 ]km Rate.
Note on all String$ Print Lines : The ASCII Character Reference chr(7) - Displays a Graphic Curser before each Line.
Note : On each [ Input Line ] intended to Valuate a Variable a Comma is placed directly before the Variable.
Correct Puctuation ensures the Program Line is Excecuted Correctly.
Note : Throughout the Program on the Variables Shown a Plus Sign [+] is either side of the Variable.
this is classed as String$ and Numerical Concatenation . Enabling the Line Flow Execution.