Write the definition of a function square, which receives an integer parameter and returns the square of the value of the parameter. So if the parameter's value is 7, the function returns the value 49. If the parameter's value happens to be 25, the functions returns the value 625. If the value of the parameter is 0, the function returns 0.
.
.
Click on the title for the solution
.
.
int square (int x)
{ int y;
y=x*x;
return y;}
.
Click on the title for the solution
.
.
This is the answer:
:
int square (int x)
{ int y;
y=x*x;
return y;}
Comments
Post a Comment