5

I wonder if you can help me in how to place one number on top of another (vertically) just as I show in the following image. I appreciate too much any help.

Example

Kami
  • 95

1 Answers1

13
\documentclass{article}
\usepackage{stackengine,amsmath,cancel}
\stackMath
\newcommand\overNot[2]{\stackon[2pt]{\cancel{#1}}{\scriptstyle#2}}
\newcommand\underNot[2]{\stackunder[3pt]{\cancel{#1}}{\scriptstyle#2}}
\begin{document}
\[
x=\frac{\overNot{9}{3}}{\underNot{2}{1}}\times
  \frac{\overNot{4}{2}}{\underNot{3}{1}}
\]
\end{document}

enter image description here