I don't know why u asked for such a small problem.
This is the code. (works with TC++ v3) Have it. Enjoy :)
U may write on it to have a better output with some other datatype, if u want...
#include<stdio.h>
#include<conio.h>
float a, b, tmp;
void rooter()
{
tmp=b;
b=b-((b*b-a)/(2*b));
printf("\n%f",b);
if(tmp!=b) rooter();
}
void main()
{
clrscr();
printf("\n\n\n\t\t\t***********SQUARE ROOT OF A NUMBER***********\n\nPlease enter the number\t: ");
scanf("%f",&a);
b=1;
rooter();
getch();
}
Sqrt value will do for u
104 views
Usually answered in minutes!
Please give more context so that we know we are not doing your homework for you.
×