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
what is use of malloc and calloc?
Explain what is a const pointer?
Why is not a pointer null after calling free?
What are the key features in c programming language?
what is different between auto and local static? why should we use local static?
On most computers additional memory that is accessed through an adapter of feature card along with a device driver program. a) user memory b) conventional memory c) expandedmemory d) area
What is the use of sizeof () in c?
What is bash c?
Q.1 write aprogram to stack using linklist o insert 40 items? Q.2 write a program to implement circular queue with help of linklist?
Explain setjmp()?
Once I have used freopen, how can I get the original stdout (or stdin) back?
What does malloc () calloc () realloc () free () do?
What are type modifiers in c?
What is echo in c programming?
Explain the red-black trees?