Home > Backend Development > C#.Net Tutorial > What does sqrt mean in C language?

What does sqrt mean in C language?

Guanhui
Release: 2020-06-13 15:05:02
Original
29611 people have browsed it

What does sqrt mean in C language?

#What does sqrt in C language mean?

In C language, sqrt means square root function. Its function is to calculate the square root of a non-negative real number. In the "math.h" file in VC6, the function prototype is "double sqrt (double number) ”, the input parameters of this function are not allowed to be negative.

Sample code

#include<math.h>

#include<stdio.h>

int main(void)
{
    double x = 4.0, result;

    result = sqrt(x);//result*result=x

    printf("Thesquarerootof%fis%f\n", x, result);

    return 0;
}
Copy after login

C language

C language is A general-purpose, procedurally oriented computer programming language. In 1972, Dennis Ritchie designed and developed the C language at Bell Telephone Laboratories in order to port and develop the UNIX operating system.

Recommended tutorial: "C#"

The above is the detailed content of What does sqrt mean in C language?. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
c
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template