How do you draw the following cylinders in latex using tikzpicture?
I have managed to learn how to draw rectangles, triangle and cuboid so far. However I have never drawn that involves circular sides.
Thank you.
Please include code showing what you've tried. There are also a lot of questions on this site about drawing cylinders, as well as examples in the TikZ manual.
For example, a few moments looking at the shapes.geometric library suggests something like this:
\documentclass[tikz,border=5pt]{standalone}
\usetikzlibrary{shapes.geometric}
\begin{document}
\begin{tikzpicture}
\node (a) [cylinder, shape border rotate=90, draw, minimum height=15mm, minimum width=7.5mm] {};
\draw [<->] ([xshift=5pt]a.before bottom) -- ([xshift=5pt]a.after top) node [midway, right] {$h$};
\draw [<->] ([yshift=-5pt]a.bottom) -- ([yshift=-5pt]a.bottom -| a.before bottom) node [midway, below] {$r$};
\end{tikzpicture}
\end{document}
\nodewherever you want it. The other bits are relative to the nodea, soais the only one you need to explicitly put as you wish. – cfr Jul 03 '18 at 22:06