Study the scenario and complete the question(s) that follow:
You are provided with the following functions
Min = CalcMin(x1, x2, x3)
The function must determine and return the minimum of the 3 variables.
Area = AreaofTriangle(base, height)
The function must calculate and return the area of a triangle using the parameters
3.1 Write the complete function Min = CalcMin(x1, x2, x3) in pseudocode to calculate and
return the minimum of the three variables.
Note: Assign the correct data type to each variable (10 marks)
3.2 Write the complete function Area = AreaofTriangle(base, height) in pseudocode to calculate
and return the area of a triangle using the parameters. (5 Marks)
3.3 Create your function to estimate the circumference of a circle by passing the radius of the
circle as a parameter only. (5 Marks)
3.1
Explanation:-
CalcMin() function takes three integer type values as input, and this function returns an integer type value, inside this function, if x1 is less than or equal to x2 and x1 is less than or equal to x3 then return x1
if x2 is less than or equal to x1 and x2 is less than or equal to x3 then return x2
Otherwise, return x3
Pseudocode:-
3.2
Explanation:-
AreaofTriangle() function, takes two float type values as input, and this function returns a float type value, inside this function, multiply base with height, then divide the result by 2, and store the result in float type variable, area, at the end return area
Pseudocode:-
3.3
Explanation:-
circumference() function, takes a float type value as input, and this function returns a float type value, inside this function, multiply 2 and 3.14 with radius, and store the result in float type variable, result, at the end return result
Pseudocode:-