Exercise 20: Defining Commands with an Optional Argument (Solution)
This is the solution to Exercise 20.\documentclass[11pt]{scrartcl} \newcommand*{\cost}[2][excl VAT @ 17.5\%]{\pounds#2 #1} \begin{document} Example 1 : \cost{50} Example 2 : \cost{100} Example 3 : \cost[inc VAT]{25} Example 4 : \cost[]{75.60} \end{document}