I have tried to use the calc package to write a macro which prints a percentage based on two numbers. E.g.: \printpercent{100}{200} should display 50% as 100 is the half-way point of 200. I have tried many different combinations, but cannot seem to get any meaningful answers printed. See below, for just one of the many formulas I have tried:
\documentclass{article}
\usepackage{calc}
\newcounter{z}
\newcommand{\printpercent}[2]{%
\setcounter{z}{#1 / #2 * 100}
$#1/#2*100=\arabic{z}\%$
}%
\begin{document}
\printpercent{1}{100}
\printpercent{250}{200}
\end{document}
That prints out:
1/100*100 = 0%
250/200*100 = 100%
- How can I calculate a percent from these numbers?

