The equation for strain is:

delta(x)/x_0

delta(x) is the change in length of the rod(final length - initial length)

x_0 is the original length of the rod

I'm trying to figure out how to write a program that will calculate the strain of an object, given its initial length and final length.