Question: In C++ Exercise 5 - In one program, write 3 separate functions, and use them 1) Write the function body for each: int squarelnteger s(

In C++ Exercise 5 - In one program, write 3 separate functions,In C++

Exercise 5 - In one program, write 3 separate functions, and use them 1) Write the function body for each: int squarelnteger s( int x) double squareDoublel double d) float squareFloat ( float f) They basically do the same thing, square a number, but use different argument datatypes. 2) Test Each function with: Using int 4, double 4.9, float 9.4 What happened when you use the 1 correct data type as input? What happened when you use the 2 incorrect data types as inputs? What is the lesson this teaches you about functions

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!