# Find the Square Root Without Using the SQRT Function in C++

The `sqrt()` function is a built-in C++ function that calculates the square root of a number. It accepts one argument `n` and returns the square root of `n`.

But did you know that we can find the square root of a number in C++ without using the `sqrt()` function? In this article, we will explain how to do this.

## Steps to Find the Square Root Without Using the `sqrt` Function in C++

• ##### During this time, we will keep updating the `temp`’s value with the previous `sqrt` value and continue in this manner. When the loop is completed, we will be eligible to print the square root of the number.

Example Code:

Solve an Equation with Square Root ...
Solve an Equation with Square Root - Grade 11
``````#include <iostream>
#include<math.h>
using namespace std;

int main()
{
int y=25;
float x =0 ;
double i;
cout<<"Let's find the Square Root of " << y;

while (i < y)
{
x = x + 1;
i = x*x;
if(y == i)
{
cout<<"\nThe square root of 25 is " << x;
break;
} } }
``````

Click here to check the working of the code as mentioned above.

## Related Article - C++ Math

• C++ Cube Root
• Find Square Root Using Babylonian Method in C++
• Magic Square Problem in C++
• Division in C++