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 structure members?

1095


When should volatile modifier be used?

1018


Why c is called a middle level language?

1115


What is an array in c?

1054


How do I determine whether a character is numeric, alphabetic, and so on?

1140


What is a good data structure to use for storing lines of text?

1087


Why do we use header files in c?

1079


Why is void main used?

1098


a program that performs some preliminary processing in C, it acts upon certain directives that will affect how the compiler does its work a) compiler b) loader c) directive d) preprocessor

1097


What is meant by gets in c?

1193


What does the function toupper() do?

1136


Write a program to check palindrome number in c programming?

1022


a direct address that identifies a location by means of its displacement from a base address or segment a) absolute address b) relative address c) relative mode d) absolute mode

1127


What is the difference between void main and main in c?

1157


Which is best linux os?

1029