This is C program that asks user to find out the square root of a number. for this operation user declare a variable for fetching the output on it user also declare a math.h header file this file contains all the math functions for required operation. Then user asks a number to find out the square root put on the square root function the last move to fetches out the result as output on the screen.
This is a C program to find out the square root of a number.
- Declare variables.
- Using math function.
- Display result on the screen.
Here is C source code for finding out the square root. Output of this program shown below.
#include <math.h> /* needed by sqrt() */
answer = sqrt(20.0);
printf("Square Root of a Give Value : %f", answer);