Given that there are 100 cylinders (0-99) and the R/W head is on cylinder 15 moving towards higher numbered cylinders, calculate the total distance (# of cylinders) travelled by the R/W head using eac

To calculate the total distance traveled by the R/W head, we need to consider the number of cylinders it passes by as it moves towards higher numbered cylinders.

If the R/W head is on cylinder 15 and moving towards higher numbered cylinders, it will pass through the following cylinders: 16, 17, 18, ..., 99.

The total number of cylinders passed is given by the difference between the highest numbered cylinder (99) and the current cylinder (15): 99 - 15 = 84 cylinders.

Therefore, the total distance traveled by the R/W head is 84 cylinders.

To calculate the total distance traveled by the R/W head, we can use the formula for the number of cylinders moved:

Total Cylinders Moved = |Current Cylinder - Destination Cylinder|

Since the R/W head is moving towards higher numbered cylinders, the destination cylinder for each step will be the next cylinder in numerical order.

Let's calculate the total distance traveled step by step:

Step 1: The current cylinder is 15. The destination cylinder is 16.
Cylinders moved in this step = |16 - 15| = 1

Step 2: The current cylinder is now 16. The destination cylinder is 17.
Cylinders moved in this step = |17 - 16| = 1

Step 3: The current cylinder is now 17. The destination cylinder is 18.
Cylinders moved in this step = |18 - 17| = 1

Step 4: The current cylinder is now 18. The destination cylinder is 19.
Cylinders moved in this step = |19 - 18| = 1

Step 5: The current cylinder is now 19. The destination cylinder is 20.
Cylinders moved in this step = |20 - 19| = 1

...and so on, until we reach the highest numbered cylinder.

We repeat this process until we reach the highest numbered cylinder. Since the highest numbered cylinder is 99, we need to repeat the process a total of 84 times (99 - 15).

Total Cylinders Moved = Cylinders moved in Step 1 + Cylinders moved in Step 2 + ... + Cylinders moved in the last step
= 1 + 1 + ... + 1 (repeated 84 times)
= 1 * 84
= 84

Therefore, the total distance traveled by the R/W head will be 84 cylinders.