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.
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;
}
Dinesh Thakur holds an B.SC (Computer Science), MCSE, MCDBA, CCNA, CCNP, A+, SCJP certifications. Dinesh authors the hugely popular Computer Notes blog. Where he writes how-to guides around Computer fundamental , computer software, Computer programming, and web apps. For any type of query or something that you think is missing, please feel free to Contact us.
Search Content
Basic Courses
Advance Courses