1. ## Can you help me please

I do not know how to write power in C can you help me please
Can write this function with C please
computeFlowRate(params, b, y)

assign yb+y^2*params.z to area

assign b+2y(1+params.z^2)^(1/2) to perimeter

assign area/perimeter to rh

assign (1/params.n) * area * rh^(2/3) * params.s^(1/2) to q

return q

2. Use the pow() function.

3. Originally Posted by Xbox999
I do not know how to write power in C can you help me please
Can write this function with C please
Show us what you have tried and we can help you, otherwise see our Homework Policy.

4. This is my try
Code:
```double computeFlowRate(PARAM params, double b, double y)
{
double area,perimeter,rh,q;

area = y*b+y pow(2)*params.z;
perimeter = b+y*(1.0+params.z pow(2))pow (0.5);
rh=area/perimeter;

q = (1/params.n)*area*rh*2.0/3.0*params.s*0.5;

return q;

}```

5. ok, if you want to take 2 to the power of 5, you would write pow(2.0 , 5.0).

pow() Function

so for yb+y^2*params.z I would write something like
Code:
`area = y * b + pow(y , 2 * params.z);`

6. Can you help me with the second one please I did not get it write
this is my try
[c]
perimeter = b+2*y*(1.0+ pow(params.z,2)pow((params.z,2),1/2));
[/c]

7. Originally Posted by Xbox999
Can you help me with the second one please I did not get it write
this is my try
[c]
perimeter = b+2*y*(1.0+ pow(params.z,2)*pow((params.z,2),1/2));
[/c]
Is that what you mean?