Joined
Last Seen
0 Reputation Points
Unknown Quality Score
No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
0 Endorsements
Ranked #107.80K
1 Posted Topic
THIS MIGHT HELP YOU [code=c]/*Square root of a number using Babylonian method of average of guesses */ main() { int i,x; float s; printf("Enter a number : "); scanf("%d",&x); s=((x/2)+x/(x/2))/2;/*first guess*/ for(i=1;i<=4;i++)/*average of guesses*/ { s=(s+x/s)/2; } printf("Sqrt %d = %f",x,s);/*~approx*/ getch(); }[/code]
The End.
dnshackme