Home /
Expert Answers /
Computer Science /
a-differentiate-between-actual-parameter-and-formal-parameter-2-marks-b-write-the-function-de-pa561
(Solved):
a) Differentiate between actual parameter and formal parameter. (2 marks) b) Write the function de ...
a) Differentiate between actual parameter and formal parameter. (2 marks) b) Write the function definition for each of the following problems: i) function cuboidVolume () that receives the length, width and height of a cuboid through its parameter. This function then calculates and return the volume using the formula: volume \( = \) length \( x \) width \( \times \) height (3 marks) ii) function sphereVolume () that receives the radius of a sphere through its parameter. This function then calculates and return the volume using the formula: \[ \text { volume }=\frac{4}{3} \pi r^{3} \]