WAP find square root of any number (without using sqrt() )?

Answer Posted / akash dilwaria

#iclude<iostream.h>
#nclude<conio.h>
void main()
{
clrscr();
int n;
float sqrt;
cout<<"\n enter the number";
cin>>n;
sqrt=pow(n,0.5);
cout<<"\n square root of a number is="<<sqrt;
getch();
}

Is This Answer Correct ?    2 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is meant by multiple inheritance?

733


What is ambiguity in inheritance?

622


What are benefits of oop?

631


class type to basic type conversion

1833


to find out the minimum of two integer number of two different classes using friend function

1637






Can you name some types of inheritance?

637


Why can't we have instance(stack) of a class as a member of the same class like eg.Class A{A obj;} as we can have self refential pointer

1618


Explain the concepts involved in Object Oriented programming.

629


How to hide the base class functionality in Inheritance?

636


What is a class and object?

595


What is difference between oop and pop?

611


Can destructor be overloaded?

593


Why do we use class in oops?

553


What is difference between polymorphism and inheritance?

617


What are two types of polymorphism?

607