Ask a question »

# C Language - finding the square root of a number

November 2014

Among the computer programming languages, C is the most basic and also the most widely used language. C can be used not only for text documents but can also be used for various

A simple C program allowing you to find the square root of a number.

For unlimited offline reading, you can download this article for free in PDF format:

**mathematical operations**. Statistical as well as mathematical exercises ranging from basic addition, subtraction, cube root,**square root**and many polynomial powers can be created through this general purpose programming language. To get the**square root of any number**, the**C script**can be customized to**code the logic**which leads to this.# [C Language] finding the square root of a number

## Intro

A simple C program allowing you to find the square root of a number.

#include <math.h> #include <stdio.h> int main(void) { double x = 4.0, result; result = sqrt(x); printf("The square root of %lf is %lfn", x, result); return 0; }

## Notes

- In this code we make use of the sqrt function, more information available on :
- Thanks to
*[TECH]*from the forum for this tip.

For unlimited offline reading, you can download this article for free in PDF format:

C-language-finding-the-square-root-of-a-number.pdf

## See also

- C language square root
- Sqrt C code
- C program to find square root of a number
- How to find square root in C program? » How-To - Programming
- Calculate the square root of a number with Google. » How-To - Google
- C++ program computing sum of squares of two » Forum - Programming
- C language software » Download
- C language - Handling 64-bit integers » How-To - C Language

## In the same category

Published by aakai1056 - Latest update by Rik Sharma