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

C++

Exercise 5 In one program, write 3 separate functions, and use them. 1) Write the function body for each: int squareInteger s( int x) double squareDouble( 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 ? Use filename: Week14YourNameProg5Fun

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!