We use percents in decimal form to multiply it with the price. We convert percents into decimals by dividing the percent number by 100. For example, 78% divided by 100 becomes 0.78.
There are two ways to look at it:
For finding the price we pay during a sale, we focus on the percent we pay. If 22% off is the sale, then we spend 78% or 100-22=78. If 20% off is the sale, then we pay 80% or 0.80. Multiply that by x an unknown price and we have 0.8x.
We can find the percent off by multiplying the price by the percent conversion. So 20% is 0.20. Then subtract it from the original price to find the leftover that we pay. This is x-0.2x.