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

What does typeof return in c?

1029


What is variable initialization and why is it important?

1181


What is function and its example?

1126


What are the three constants used in c?

941


Why does this code crash?

1032


What is the purpose of ftell?

1044


What is Dynamic memory allocation in C? Name the dynamic allocation functions.

1342


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

1090


How can I determine whether a machines byte order is big-endian or little-endian?

1016


What are the different types of control structures in programming?

1092


What is the difference between local variable and global variable in c?

1171


Explain what does the format %10.2 mean when included in a printf statement?

1300


Explain how can I remove the trailing spaces from a string?

1005


How does placing some code lines between the comment symbol help in debugging the code?

952


What is echo in c programming?

973