Turn Desktop View Off
by Dinesh Thakur

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.

Problem Statement:
This is a C program to find out the square root of a number.

  1. Declare variables.
  2. Using math function.
  3. Display result on the screen.

Here is C source code for finding out the square root. Output of this program shown below. 

#include <stdio.h>
#include <math.h> /* needed by sqrt() */
int main(void)
{
  double answer;
  clrscr();
  answer = sqrt(20.0);
  printf("Square Root of a Give Value : %f", answer);
  getch();
  return 0;
}

Find the Square Root of a Give Value