Current location - Training Enrollment Network - Mathematics courses - The function of c language is to calculate the n power of x.
The function of c language is to calculate the n power of x.
Using C language to calculate the n power of x can be realized by library function. The specific code is as follows:

# include & ltstdio.h & gt

# include & ltmath.h & gt

int main( ) {printf("%f ",pow(x,n)); Returns 0; }

C language is a structured language, with distinct levels and modular programming. And C language is very powerful in processing and expression. With very comprehensive operators and various data types, you can easily construct various data structures, and you can directly address memory and directly operate hardware through pointer types.

Extended data:

If a declared variable is preceded by an *, it indicates that it is a pointer variable. In other words, the variable stores an address, and * (especially monocular operator * here, the same below. There is also a binocular operator in C language *) which is a content operator, meaning to fetch the content stored in this memory address. Pointer is one of the main characteristics that distinguish C language from other contemporary high-level languages.

Pointers can be not only the addresses of variables, but also the addresses of arrays, array elements and functions. Pointers can be used as formal parameters to get multiple return values in the process of function calling, unlike return(z) which can only get one return value.

Baidu encyclopedia -C language