Finding square root of any number is pretty simple. In this post, i will explain you step-by-step to find square root of any given number using a predefined function **sqrt().** Before checking program, i will suggest you to clear your concept related to "What is square root & how to find them ?"

For better understanding of C program, please refer C program of addition of two numbers.

# What is square root of any number ?

Square root of any number is just the reverse of squaring of that number. We already know that square of any number is the number multiplied by itself. i.e., if we suppose to find the square of any number say 3, then its square is 9.

Coming to square root,

**Square root** of any number (say) **81 is 9.** Lets find it graphically.

# Algorithm of program ( Square root in C )

- Start
- Accept one number from user.
- Use the function sqrt() to find square root.
- Print the result.
- End

# Program of square root in C

`#include<stdio.h>`

#include<conio.h>

#include<math.h>

int main()

{

int n,result;

printf("Enter any number :\t");

result=sqrt(n);

printf("\nSquare root of given number is : %d",result);

getch();

}

## Explanation of program of square root

**Declaration of Header File :**Before writing any program, firstly we have to declare its Header files which we have to use in our program. If you are not familiar with header files then please refer Use of header file in C.**Declaration of data types :**For this program of square root, we need to declare two data types of int type i.e., one for taking input from user and other one for storing the result in it.**Use of sqrt() function :**Sqrt() function is a predefined function present in math.h library. The main purpose of using sqrt() function is, it will give the square root of any number using its predefined definition.

ilovecoding (39)· 2 months agoHello! Your post has been resteemed and upvoted by @ilovecoding because

we love coding! Keep up good work! Consider upvoting this comment to support the @ilovecoding and increase your future rewards! ^_^ Steem On!Reply !stop to disable the comment. Thanks!kkay05 (47)· 2 months agoYou gave us an unique information.I never thing that the square root also used in algorithms

Posted using Partiko Android

tts (59)· 2 months agoTo listen to the audio version of this article click on the play image.

Brought to you by @tts. If you find it useful please consider upvoting this reply.

postpromoter (61)· 2 months agoYou got a 4.63% upvote from @postpromoter courtesy of @shivangi!

Want to promote your posts too? Check out the Steem Bot Tracker website for more info. If you would like to support the development of @postpromoter and the bot tracker please vote for @yabapmatt for witness!

amritmahal (56)· 2 months agowell done

steemitboard (64)· 2 months agoCongratulations @shivangi! You have completed the following achievement on the Steem blockchain and have been rewarded with new badge(s) :

Award for the total payout received

_{Click on the badge to view your Board of Honor.}_{If you no longer want to receive notifications, reply to this comment with the word STOP}unknownphoton (38)· 2 months agoHehe thanks for posting it..!!

Your post took me back to first year C programming class

:-)