Question: Use OCaml programming language. 1 . Print the average of the following numbers 1 0 , 5 0 , 2 5 1 5 . 1

Use OCaml programming language. 1. Print the average of the following numbers
10,50,25
15.1,40,5.1.
2. Compute the area of a rectangle using let binding. Use let to define variables: height, width of any values you like, then use the variables to compute the area of the rectangle.
3. Write a function rectangle_area that takes the arguments h, and w and return h times w.
4. Write a function max that takes two arguments a, b and returns the larger of the two. If a is larger, then a is return. Otherwise, b is returned.
5. Write a function that takes three argument a, b, and c. It returns the largest of the three.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!