Squaring quantities with units I am programming a script to an online store and a serious mathematical problem happened, and I cannot solve it! 
This is the problem: if a person has only 10 cents (on any monetary currency, I will use US Dollar for example) it's the same as say that this person has $ 0.1 right?
I mean 10 cents = $ 0.1 , right?
Now, lets square it. The 10 cents becomes 100 cents, which is  1 dolar. Right? But 0.1*0.1 = $0.01. 
I am very sure I can do this math using cents OR using any other unit I want and the result should be the same. If I have the same example and I want to make the square with a number that is in meters and other is in kilometer. The result should be the same, but it is not! What is the issue here?
EDIT:
One final question, a function with $x^3$ should increase faster than $x^2$ right?
For example, $2^2 = 4$ and $2^3 = 8$
$10^2 = 100$ and $10^3 = 100$
So the $x^3$ graphic should always be on top of $x^2$. Why doesnt that happen all the time? 
OBS: this edit looks not related to my main question but it is completely, depending on the answer.
 A: The calculation is correct (though you have named the units incorrectly).
I doubt you have a problem with the fact that 1 yard = 3 feet, but 1 square yard = 9 square feet. It's the same sort of thing.
A: If you square 10 cents, then you have 100 "square-cents".
If you square 0.1 Dollar, then you have 0.01 "square-Dollars".
Now, 100 "square-cents" is the same as 0.01 "square-Dollars". 
Maybe it's not such a good idea to square money...
A: Although there are many correct answers already posted, I'd like to post an answer that is easier to read and conceptualize.
If you have \$0.10 and you want to collect ten of them, then the calculation is simple: "10 x \$0.10 = \$1", which is what you expect.
Conversely, when you say you want to "square" ten cents, what you're really saying is you want to "ten cents the ten cents", which doesn't make any sense.
Alternatively, if you view each cent as one percent (which is where the term "percent" came from, "per cent" or "per one hundred"), ten cents is thus 10%, which if squared, means "10% of 10%", which is 1%.
A: The problem is you aren't keeping track of the units properly. $(10\textrm{ cents})^2=100\textrm{ cents}^2$ whereas $(\$0.1)^2=\$^20.01$. Note that since $100\textrm{ cents}=\$1$, we have that $10000\textrm{ cents}^2=\$^21$. Using this unit conversion, the equality that looked weird to you holds.
A: You probably don't want to square the money (otherwise, the unit would change from cents or $\$$ to cents^2 or $\$^2$, and the result you get in these units is not a contradiction); more likely, you expect a result tantamount to multiplying the amount by 10.
