Program to take square root of a number.

Using Visual Studio 2015


==============================================================


#include<iostream>
using namespace std;
#include<conio.h>
#include<math.h>

void main()
{

float num;

cout<<"Enter number=";

cin>>num;

cout<<sqrt(num);

_getche();
}

=========================================================================

It's a simple program to take a square root of a number. For this program we take an additional header file '#include<math.h>'. We take a special keyword for this too 'sqrt' and then enter the number in the brackets.

Comments

Popular posts from this blog

Determining the uppercase and lowercase vowels.

Program to calculate basic arithmetic operations.

Program to create a multiplication table of a given number using while loop.