Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and beauty - C language programming
C language programming
Fac refers to a function with a return type of double, which requires an integer parameter (see the definition of fac in your program). Here fac(i) in the main () function is a call to this function, that is, it is given an integer variable I as its parameter, so it can be used for the internal operation of fac.

It should be noted that when defining fac, internal I is its internal parameter (local variable), and its scope of action is limited to the inside of fac. Now in main (), we give fac () an integer named I, and it will only give its value to N in fac to participate in the operation of fac.

In fact, n is only a formal parameter, and its scope of action is limited to fac. But since it is placed in fac(int n), it is given a task to pass the parameters given to fac () in main () to fac (), thus completing the call to fac ().