Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

Code for calculating
square root without
using library function,
of math.h

Answer Posted / sarath

#include<stdio.h>
#include<conio.h>

void main()
{
float i,num;
printf( "Enter number : ");
scanf("%f",&num);
for(i=2.0;i<num/2;i++)
{
if(num/i==i)
{
printf(" \nSquare root of %.0f = %.0f",num,i);
break;
}
else
continue;
}

if(num/i!=i)
printf("\nThere is no perfect integer square root for the number %.0f",num);
getch();
}

Is This Answer Correct ?    34 Yes 17 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the __date__ and __time__ preprocessor commands?

1039


Is it valid to address one element beyond the end of an array?

1120


What is dynamic memory allocation?

1282


Ow can I insert or delete a line (or record) in the middle of a file?

953


Explain what is the heap?

1013


Explain what will be the outcome of the following conditional statement if the value of variable s is 10?

1185


what is event driven software and what is procedural driven software?

2507


What is a structural principle?

1090


What is the purpose of the statement: strcat (S2, S1)?

1075


How can I get random integers in a certain range?

1014


What is the use of function in c?

1141


What are the uses of a pointer?

1100


Calculate the weighted average of a list of n numbers using the formula xavg = f1x1+f2x2+ ….+ fnxn where the f’s are fractional weighting factors, i.e., 0<=fi<1, and f1+f2+….+fn = 1

4183


Is javascript based on c?

997


Explain setjmp()?

1007