0 votes
123 views
in C programming by (98.9k points)
edited
C Program to Find Square Root of a Number using sqrt Function

1 Answer

0 votes
by (98.9k points)
selected by
 
Best answer
#include <stdio.h>
#include <math.h>
  
int main () {
    double x, result;
    printf("Enter a number\n");
    scanf("%lf", &x);
    
    result = sqrt(x);
    printf("Square root of %lf = %lf\n", x, result);
    
    return 0;
}

 

Related questions

0 votes
1 answer 309 views
0 votes
1 answer 1.5k views

Doubtly is an online community for engineering students, offering:

  • Free viva questions PDFs
  • Previous year question papers (PYQs)
  • Academic doubt solutions
  • Expert-guided solutions

Get the pro version for free by logging in!

5.7k questions

5.1k answers

108 comments

558 users

...