Answer:
Following is the definition of the required function:
def powerTo( double first, int second);
if second > 0;
double result = pow(first,second);
return result;
else
return 0;
Explanation:
The explanation for above code is as follows:
- A function named powerTo is defined, having two arguments with data type double and integer respectively.
- A if condition is applied that checks the second parameter.
- If the the condition: second > 0 gets true, a value is returned which is equal to first parameter raised to the second.
- If the condition is if bracket gets false, 0 is returned as a result.
i hope it will help you!
Answer:
hope this helped
Explanation:
Computer technology has helped the world to grow and evolve quickly. By performing tasks quickly, computers make daily activities more convenient. They give people access to a wide array of information and can reach even the most remote locations on the planet.
The correct answer is A : Business Process
Kakapo our new generation is a lot more work
Answer:
const double gasDollarPerGallon = 20 ;
float calCost( double milesPerGallon ) {
double costPerGallon = milesPerGallon / gasDollarPerGallon;
System.out.printf ("%.2f/n", &costPerGallon);
int main ( ) {
scanf ("%2f", &gasDollarPerGallon) ;
calCost( 20 );
calCost( 75 );
calCost( 500 );
Explanation:
The C source code above gets the user input of the gas dollar per gallon from the command prompt and divides the miles per gallon variable in the function call to get the cost of gas for the range of miles. It is also print out as a double with two places.