Motel costs

This task is about using a flowchart to solve problems and form an equation.
illustration: Wharenui court motel
 
Cost of staying at Wharenui Court Motels
flowchart for costs of staying at the Wharenui court motel

Use the flowchart to answer the following questions about the cost of staying at the Wharenui Court Motels.

a)
What is the total cost of staying at the motel if
 
 
i)   1 person stays 1 night? 
 
     $ ___________________
 
ii)  1 person stays 3 nights? 
 
     $ ___________________
 
 
iii) 20 people stay 1 night?
 
     $ ___________________
iv) 5 people stay 2 nights? 
 
     $ ___________________
 
b)
Let C = "total cost" and p = "number of people".
Complete an equation to show how much it costs 2 or more people to stay at the motel for 1 night.