Home > Back-end >  Direct access to the main function after debugging, the function, skip the Pow, how to enter the Pow
Direct access to the main function after debugging, the function, skip the Pow, how to enter the Pow

Time:11-21

I use the vc6.0 debugging


# 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 F11
Double 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 variables

CodePudding 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,
  • Related