C-Sharp | Java | Python | Swift | GO | WPF | Ruby | Scala | F# | JavaScript | SQL | PHP | Angular | HTML
C++ Math sqrt()This function finds the square root of a given number. Consider a argument 'arg' :square_root of a number=√arg SyntaxSyntax would be : double sqrt(double arg); float sqrt(float arg); long double sqrt(long double arg); double sqrt(integral arg); Parameterarg: It is the value of float or integer type. Return valueIt returns the square root of the argument arg. Example 1Let's see a simple example when argument 'arg' is of integer type. #include Output: Square root of a number is : Example 2Let's see a simple example when argument 'arg' is of float type #include Output: Square root of a number is :2.91548
Next TopicC++ Math Functions
|