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 / manikant

#include<iostream.h>
void main()
{
int num,i;
cout<<"enter anumber:";
cin>>num;
for(i=2;i<num/2;i++)
{
if(num/i==i)
{
cout<<"\nsquareroot of "<<num<<"="<<i;
break;
}
else
continue;

}
if(num/i!=i)
cout<<"\nthis no is not a perfect square.";
}

Is This Answer Correct ?    16 Yes 13 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Why is it that not all header files are declared in every C program?

1280


What is the process to generate random numbers in c programming language?

1216


What are the different types of control structures?

1082


What is masking?

1213


When do we get logical errors?

1170


What is zero based addressing?

1233


What is #include stdio h?

1177


Explain what is a const pointer?

1120


Explain what is the benefit of using an enum rather than a #define constant?

1274


What is signed and unsigned?

1121


Explain how can I make sure that my program is the only one accessing a file?

1268


In c programming write a program that will print 10 multiples of 3 except 15,18,21 using looping

1588


How can I get back to the interactive keyboard if stdin is redirected?

1231


What math functions are available for integers? For floating point?

1184


Explain how can I right-justify a string?

1091