Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Marketing Database Analytics

Authors: Andrew D. Banasiewicz

1st Edition

0415657881, 978-0415657884

More Books

Students also viewed these Databases questions