# include "stdafx. H"
# include "math. H"
Double Pow (double x, int y)
{
Double P=1;
Int I, p;
For (I=1; i<=y; I++)
P *=x;
Return the p;
}
Int main (int arg c, char * argv [])
{
Double x;
int y;
Printf (" please input power operation (ex. 2 ^ 3) : \ n ");
Lf the scanf (" % ^ % d ", & amp; X, & amp; Y);
Printf (" the power of computing results: %. 7 lf \ n ", pow (x, y));
return 0;
}
CodePudding user response:
To put it bluntly, is how to enter the code for F10 or F11Double Pow (double x, int y)
{
Double P=1;
Int I, p;
For (I=1; i<=y; I++)
P *=x;
Return the p;
}
CodePudding user response:
The function name, pay attention to the case, pow and p variablesCodePudding user response:
double Pow (double x, int y)
{
Double P=1;//returns the type double, so should be returned by the big P
Int I, p;
For (I=1; i<=y; I++)
P *=x;//should be here with P
Return the P;
}
CodePudding user response:
Is the main entrance to the function, of course begins with the main, call the function in the main, will enter, or by the interrupt function,