Convert the algorithm in pseudocode below to syntactically correct C++ code.
CalculateTotalCost
Display instructions
Get numberOfUnits
If numberOfUnits > 100 then
discountRate = .5
else if numberOfUnits > 50 then
discountRate = .33
else if numberOfUnitis > 25 then
discountRate = .1
else
discountRate = 0
end if
cost = 99 * numberOfUnits
totalCost = cost - cost * discountRate
display numberOfUnits, discountRate, cost and totalCost
End