Question: Write a C + + function named whole ( ) that returns the integer part of any number passed to the function. ( Hint: Assign

Write a C++ function named whole() that returns the integer part of any number passed to the function. (Hint: Assign the passed argument to an integer variable.) Include the function written in a working program. Make sure your function is called from main() and correctly returns a value to main(). Have main() use a cout statement to display the returned value. Test the function by passing three data to it (integer, double, negative). When you're confident that the whole() function written for works correctly, save it in a namespace and a personal library of your choice in the C: drive. Submit code with three sample runs plus cpp and namespace files.
 Write a C++ function named whole() that returns the integer part

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!