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
When can a far pointer be used?
In which layer of the network datastructure format change is done
What are loops in c?
Can static variables be declared in a header file?
how we can make 3d venturing graphics on outer interface
What is ambagious result in C? explain with an example.
What is a function simple definition?
Why doesnt that code work?
What are local static variables? How can you use them?
What is c token?
how do you execute a c program in unix.
What is sizeof c?
which is an algorithm for sorting in a growing Lexicographic order
Explain what is #line used for?
What is the difference between #include