Write a Octave program called circle_params that calculates the area and circumference of a circle. The function should accept the radius of the circle as an input argument, perform the calculations for the area (pi * r2) and the circumference ((2 * pi * r), and return the calculated values in a vector as the output argument. Do nor prompt the user for the radius.
Write a Octave program called circle_params that calculates the area and circumference of a circle.
The function should accept the radius of the circle as an input argument, perform the calculations for the area (pi * r2) and the circumference ((2 * pi * r), and return the calculated values in a
Do nor prompt the user for the radius.
Write the function header that specifies the input and out arguments. Assume the function is called circle_params, the input argument is radius and the return (output arguments) values are area and circumference? Answer :
Write the line to calculate the area in the function? Answer :
Write the line to calculate the circumference in the function? Answer :
Step by step
Solved in 2 steps