Write linear and exponential functions: word problems