Write a program in 'C' enter a positive number and to calculate and print its square root (sqrt)
#include< #include< #include< 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
0 comments:
Post a Comment