Write a service package declaration and body called


Problem

Write a service package (declaration and body) called My_Math_Library that contains a single function called Sqrt that returns the square root of a Float value. Use the function for calculating square roots given in Chapter 6. However, instead of declaring the tolerance as a local constant in the function, declare it in the package body. Use a tolerance value of 0.00001. Write an Ada program to test your service package. In this program prompt the user to enter a Float value. Then display its square root calculated by your service package, its square root calculated by the square root in Ada.Numerics.Elementary_Functions, and the difference between the two calculated square roots.

Request for Solution File

Ask an Expert for Answer!!
Computer Engineering: Write a service package declaration and body called
Reference No:- TGS02652965

Expected delivery within 24 Hours