representing exponents like x to the power 2 3 and so on
DHARMENDRA perisetla
Greenhorn
Joined: Feb 10, 2003
Posts: 3
posted
0
I want display x square x cube and so on can some one help me
Layne Lund
Ranch Hand
Joined: Dec 06, 2001
Posts: 3061
posted
0
You need to ask a more specific question. How do you want to display this information? Are you simply interested in calculating the value of x squared or x cubed and then "displaying" it? Or are you writing some kind of math software that needs to display these in an equation of some sort? Are you writing a text-based program? Or are you developing a GUI? These questions should help give you ideas. In short, we need more details about your specific problem in order to help much. Keep coding! Layne
I want to display the equation in a text based program.It is a kind of Math software where u have to display the equation. displaying like this (x^4)is not what i need.
Cindy Glass
"The Hood"
Sheriff
Joined: Sep 29, 2000
Posts: 8521
posted
0
So are you asking how to display a superscript?
"JavaRanch, where the deer and the Certified play" - David O'Meara
Text-based output is very limited. That is why something like x^4 is commonly used. As mentioned Unicode can give you more options, but it is still limited by the display capabilities of the platform you are running on. In order to produce output similar to that in a text book, you will probably have to use some kind of graphical display that can manipulate the font properties.
subject: representing exponents like x to the power 2 3 and so on