Square root of a number

#include<stdio.h>
#include<math.h>
int main()
{
    double n,s;
    scanf("%lf", &n);
    s=sqrt(n); 
    printf("Square root is: %lf", s);
    return 0;
}
Input:
2
Output:
Square root is 2.0

No comments:

Post a Comment