Code for calculating
square root without
using library function,
of math.h
Answer Posted / sarath
#include<stdio.h>
#include<conio.h>
void main()
{
float i,num;
printf( "Enter number : ");
scanf("%f",&num);
for(i=2.0;i<num/2;i++)
{
if(num/i==i)
{
printf(" \nSquare root of %.0f = %.0f",num,i);
break;
}
else
continue;
}
if(num/i!=i)
printf("\nThere is no perfect integer square root for the number %.0f",num);
getch();
}
| Is This Answer Correct ? | 34 Yes | 17 No |
Post New Answer View All Answers
shorting algorithmS
What should malloc(0) do?
please can any one suggest me best useful video tutorials on c i am science graduate.please help me.u can email me to sas29@in.com
What is a 'null pointer assignment' error?
How many loops are there in c?
How can you convert integers to binary or hexadecimal?
What are high level languages like C and FORTRAN also known as?
What are unions in c?
Disadvantages of C language.
Who developed c language?
How was c created?
simple program of graphics and their output display
What are the 5 types of inheritance in c ++?
Is main is user defined function?
What is null in c?