# Thread: how to apply phythagoras theorem to caculate hypotenuse without math.h without header

1. ## how to apply phythagoras theorem to caculate hypotenuse without math.h without header

any 1 has solution for it:, In the triangle Pythagoras theorem is used to find out the length of any in known side
If the base is 4 cm and height is 7cm find out the hypotenuse by using the Pythagoras

(Hypotenuse) 2 = (base) 2+ (perpendicular )2

, i need C++ code of it without header file of <math.h> , need to put only conio.h ,iostream.h header file only,

have done this code:
Code:
```#include<conio.h>
#include<iostream.h>
#include<math.h>
void main()
{
clrscr();
int base,perp,hyp;
base=4,perp=7;
base=base*base;
perp=perp*perp;
hyp=sqrt(base+perp);
cout<<hyp;
getch();
}```
but i hv to do this solution without math.h header file, then how can i find square root ? any alternate method to solve it without math.h header file please help

2. OK, now for the next thing to read: << !! Posting Code? Read this First !! >>

3. rags@ i have read it.. now please try to help me

4. fronty@ can u please tell me for 65 to calculate square root

5. amerjamil, if you are really lost, then go for a naive but easy to understand and implement solution for integers: increment starting from 0, and square the number. Eventually, the square will be equal to (or greater than) your target number, thus you know that the current number (or previous number) is the square root.