Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

What is realloc in c?

1120


struct screen_pos{ int row, col } ;move_right(cursor)struct screen_pos *cursor;{ cursor.col++; } /* This statementhas a syntax error */What is the correct statement a) cursor.col = cursor.col + 1; b) col.cursor++; c) *cursor.col++; d) pointer

1298


Given two strings S1 and S2. Delete from S2 all those characters which occur in S1 also and finally create a clean S2 with the relevant characters deleted.

1408


Why main is used in c?

1078


Can include files be nested? How many levels deep can include files be nested?

1172


What is self-referential structure in c programming?

1224


pgm to find any error in linklist(in single linklist check whether any node points any of previous nodes instead of next node)

2646


Where define directive used?

1097


What is the use of f in c?

984


Why void main is used in c?

1053


What is spark map function?

1144


Is c easier than java?

1084


What is array in C

1168


Write a code to remove duplicates in a string.

1042


What should malloc(0) do?

1127