C Language

June 6, 2023

How to use square root in C language

program to use square root in C language


#include <stdio.h>
#include <math.h>
int main()
{
    double n, s;
    printf("Enter a number : ");
    scanf("%lf", &n);
    s = sqrt(n);
    printf("square root of %.2lf is %.2lf\n", n, s);
    return 0;
}

output


Enter a number : 36
square root of 36.00 is 6.00

by : Ajaj Khan

Quick Summary:

इस progaram मैं square root निकल रहा है