I want to generate two integer random numbers for the radius (r) and heigth (h) of a cilinder, in a certain question of my exam.
I am using the package xfp
to generate the random numbers.
However, I would like to determine the volume of this cilinder, in function of these randomic values.
I have noted that \FPeval{}{}
does not work when I have random numbers.
There is a way to store these values in a variable using package xfp?
Below, my code:
\documentclass{article}
\usepackage{xfp}
\begin{document}
The value for the radius of a cilinder is equal to $r=\fpeval{randint(1,10)}$.
Supose that the height is equal to $h=\fpeval{randint(1,10)}$.
Then the volume of this solid is equal to $V=\pi r^2=.....$
(calculate the volume automatically)
\end{document}
'''