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 is the value of h?

1043


Explain the difference between the local variable and global variable in c?

1077


find out largest elemant of diagonalmatrix

2256


Explain the difference between #include "..." And #include <...> In c?

1033


C program to find all possible outcomes of a dice?

2365


How can I write functions that take a variable number of arguments?

1130


What are global variables and how do you declare them?

1102


What is the heap in c?

1085


What is the difference between NULL and NUL?

1297


Why isnt any of this standardized in c?

1088


What is the difference between the expression “++a” and “a++”?

1234


Here is a good puzzle: how do you write a program which produces its own source code as output?

1106


Is there a built-in function in C that can be used for sorting data?

1269


Explain what is the difference between a string and an array?

1173


How can you increase the size of a dynamically allocated array?

1192