Search This Blog

Thursday, October 13, 2011

Write a program that will read an integer number and evaluate and display its square root as a float variable

   1:  #include<stdio.h>
   2:  #include<conio.h>
   3:  #include<math.h>
   4:  void main()
   5:  {
   6:  int n;
   7:  floar r;
   8:  printf("Enter an interger no\n");
   9:  scanf("%d",&n);
  10:  r=sqrt(n);
  11:  printf("Square root of %d is: %f\n",n,r);
  12:  getch();
  13:  }

No comments:

Post a Comment