Code for calculating
square root without
using library function,
of math.h
Answer Posted / abhinav dwivedi
#include<stdio.h>
#include<conio.h>
void main()
{
int num,i;
clrscr();
printf("enter no to find square root");
scanf("%d",&num);
for(i=1;i<=num/2;i++)
{
if(num/i==i && num%i==0)
{
printf("square root of entered no is %d",i);
break;
}
else
{
continue;
}
}
if(num/i!=i)
printf("their is no perfect suare root of entered no");
}
| Is This Answer Correct ? | 10 Yes | 9 No |
Post New Answer View All Answers
c program to compute AREA under integral
Explain low-order bytes.
What is c language & why it is used?
Explain built-in function?
What is an endless loop?
write a program using linked list in which each node consists of following information. Name[30] Branch Rollno Telephone no i) Write the program to add information of students in linked list
I have seen function declarations that look like this
Explain how can I manipulate strings of multibyte characters?
How do I use void main?
Why is c faster?
Why malloc is faster than calloc?
Why c is called a mid level programming language?
What is NULL pointer?
Explain null pointer.
What is the difference between %d and %i?