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
Explain heap and queue.
Why can't I perform arithmetic on a void* pointer?
Can include files be nested?
What is getch() function?
What do you understand by normalization of pointers?
What are the benefits of organizational structure?
What is define c?
Write a Program to find whether the given number or string is palindrome.
What are the 3 types of structures?
List the difference between a While & Do While loops?
Can a function be forced to be inline? Also, give a comparison between inline function and the C macro?
What is omp_num_threads?
which of the following is not a character constant a) 'thank you' b) 'enter values of p, n ,r' c) '23.56E-o3' d) all of the above
What are the 4 data types?
What is the use of header?