Get Email Subscription

Enter your email address:

Delivered by FeedBurner

Saturday, January 2, 2010

Write a program in 'C' enter a positive number and to calculate and print its square root (sqrt)



#include<stdio.h>
#include<conio.h>
#include<math.h>
main()
{
float n, s;
printf("Enter any positive number\n");
scanf("%f", &n);
s = sqrt(n);
printf("The Square root of %f is %f\n", n, s);
return(0);
}

For eg :-

Output :-
Enter any positive number
25
The Square root 25 is 5.000000

Related Posts by Categories



0 comments:

About This Blog

Lorem Ipsum

  © Blogger templates Newspaper III by Ourblogtemplates.com 2008

Back to TOP