I want to write a superscript and a subscript at the same place.Every time I do it, it is a superscript then a space followed by the subscript. How do I stack it vertically?
I presume you are in math mode and I assume you want to have both superscript and subscript horizontally aligned next to the symbol you are super-/subscripting. You can achieve this like this:
$A_b^c$. Note that the order is irrelevant,
$A^c_b$ looks identical. You can group symbols using curly brackets like so: