**Program to find the square root of a number in c and CPP,c plus plus**

In this tutorial, we will try to learn the followings;

- How to draw the flow chart of the square root of a number?
- How to find the square root of a number in C++?
- How to find the square root of a number in C?

**How to draw the flow chart of the square root of a number?**

**How to find the square root of a number in C++?**

1 2 3 4 5 6 7 8 9 10 11 |
#include <iostream> #include<math.h> using namespace std; int main() { float NO, answer_of_GivenNO; cout <<"Enter number to find its squareroot: "; cin >> NO; answer_of_GivenNO = pow(NO, 0.5); cout<<"Squreroor of "<<NO<<" is: " << answer_of_GivenNO << endl; } |

**Output:**

**How to find the square root of a number in C?**

1 2 3 4 5 6 7 8 9 10 |
#include <stdio.h> #include <math.h> int main() { double no, root_of_no; printf("Enter number to find its root: "); scanf("%lf", &no); root_of_no = sqrt(no); printf("Square root of %.2lf = %.2lf", no, root_of_no); } |

**Output:**