Tahamina_Taha

Square root function

Jul 20th, 2019
48
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.40 KB | None | 0 0
  1. #include<stdio.h>
  2. #include<math.h>
  3. #include<conio.h>
  4. //C sqrt() Function
  5. int main()
  6. {
  7.    /*The square root is therefore an nth root with .
  8.     any positive real number has two square roots, one positive and one negative */
  9.     double num,result;
  10.     printf(" Enter any number : \n");
  11.     scanf("%lf",&num);
  12.  
  13.     result=sqrt(num);
  14.     printf("square root of %.2lf= %.1lf",num,result);
  15.     return 0;
  16. }
Add Comment
Please, Sign In to add comment