Tuesday, 29 September 2015

C Program to calculate the square root of a given number



/*C Program to calculate the square root of a given number*/
#include<stdio.h>
#include<math.h>
main()
{
      double num,ans;
      printf("\n Enter the value of number");
      scanf("%lf",&num);
      ans=sqrt(num);
      printf("\n The square root of %lf is %lf ",num,ans);
}

No comments:

Post a Comment