Write a program with a function volume () which accepts three sides of a cube
and returns its volume. Provide a default value of 1 for all the three sides of a
cube. Call this function with zero, one, two and three arguments and display the
volume returned in the main ().
Answers
Answered by
1
Using Standard Method
1)The value of side of a cube will store into the variable “side”.
2)The value will be substituted into the formula area=side*side*side.
3)The calculated value will store into the variable “area”, and displayed using printfunction.
Attachments:
Similar questions