0. FORTUNATELY, IT IS EASY TO DEFINE A FUNCTION THAT DOES TRUE ROUND...

3.0. Fortunately, it is easy to define a function that does true rounding. The function is definedroundin Display 3.6. The function round rounds its argument to the nearest integer. For example, round(2.3) returns 2, and round(2.6) returns 3. To see that round works correctly, let’s look at some examples. Consider round(2.4). The value returned is the following (converted to an int value):floor(2.4 + 0.5)which is floor(2.9), or 2.0. In fact, for any number that is greater than or equal to 2.0 and strictly less than 2.5, that number plus 0.5 will be less than 3.0, and so floor applied to that number plus 0.5 will return 2.0. Thus, round applied to any number that is greater than or equal to 2.0 and strictly less than 2.5 will return 2. (Since the function declaration for roundspecifies that the type for the value returned is int, we have type cast the computed value to the type int.)Now consider numbers greater than or equal to 2.5; for example, 2.6. The value returned by the call round(2.6) is the following (converted to an int value):floor(2.6 + 0.5)which is floor(3.1), or 3.0. In fact, for any number that is greater than 2.5 and less than or equal to 3.0, that number plus 0.5 will be greater than 3.0. Thus, round called with any num-ber that is greater than 2.5 and less than or equal to 3.0 will return 3. Thus, round works correctly for all arguments between 2.0 and 3.0. Clearly, there is nothing special about arguments between 2.0 and 3.0. A similar argument applies to all nonnegative numbers. So, round works correctly for all nonnegative arguments.Display 3.6 The Function round (part 1 of 2)1 #include <iostream>Testing program for 2 #include <cmath>the function round3 using namespace std;4 int round(double number);