First, create a table that contains a column for each input, output. For the program given above, you will need a table as shown in Table 6. The first instruction in the algorithm is for the user to enter the value of km driven, and the liter of petrol used. Place these values in the corresponding columns as shown in the following table.

The next instruction is to calculate the km per liter value based on the formula given, which is to divide the value of km driven by the value of petrol used. Using the table, you will get the values that are to be calculated. So, if for example, the km driven column or the petrol used column in the table is empty, then you know that your algorithm has missed a step. Now, since you have the values in the respective columns, use those values to calculate the km per liter value. 324 divided by 35 = 9.25, and place that value in the km per liter column as shown in Table 7 below.