<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;"> % This file is public domain
\documentclass[a4paper]{article}

\usepackage{probsoln}
 %uncomment the following line to display the answers
\showanswers

 % The following will generate a different set of
 % problems in subsequent years
 %\PSNrandseed{\year}

 % The following will generate a different set of
 % problems on every run (where each run is at
 % least a minute apart from the previous one)
\PSNrandseed{\time}

\begin{document}
\title{Sample Problem Sheet}
\author{Nicola Talbot}
\maketitle

\begin{enumerate}

\newcounter{numproblems}
 % store a random number from 1 to 3 in the counter numproblems
\random{numproblems}{1}{3}

 % selects 1,2 or 3 problems from 1 of the given files:
\doforrandN{1}{\file}{prob-1stprncp,prob-implicit}{\selectrandomly{\file}{\value{numproblems}}}

\item Differentiate the following functions:
\input{prob-args}% load database
\begin{enumerate}
\newcounter{A}
\newcounter{B}
\newcounter{C}
\random{A}{-4}{5}
\random{B}{-3}{3}
\random{C}{-1}{10}
\item \useproblem{diff:quad}{\arabic{A}}{\arabic{B}}{\arabic{C}}

\random{A}{-5}{5}
 % make sure its not 0
\whiledo{\value{A}=0}{\random{A}{-5}{5}}
\item \useproblem{diff:sin}{\arabic{A}}
\end{enumerate}
\end{enumerate}
\end{document}
</pre></body></html>