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

When do you not use the keyword 'return' when defining a function a) Always b) Never c) When the function returns void d) dfd

1051


Explain the difference between ++u and u++?

1127


What is d scanf?

1076


What is the return type of sizeof?

1061


What is difference between Structure and Unions?

1249


program to find out date after adding 31 days to a date in the month of febraury also consider the leap year

3081


Explain c preprocessor?

1106


What is queue in c?

1096


What is the value of h?

1033


What is nested structure in c?

1058


What is the behavioral difference when include header file in double quotes (“”) and angular braces (<>)?

1329


What is hash table in c?

1017


When is a “switch” statement preferable over an “if” statement?

1138


How can I split up a string into whitespace-separated fields?

1051


Program to find the sum of digits of a given number until the sum becomes a single digit. (e.g. 12345=>1+2+3+4+5=15=>1+5=6)

1144