Pages

Friday 18 March 2011

PROGRAM TO CALCULATE THE SQUAREROOT OF THE GIVEN NUMBER

DESCRIPTION-:This program calculates the square root of the entered number.It may be sure that the value of entered number should be greater than the 0.As the value of square root for negative number is "imaginary".
FOR EXAMPLE-: If we enter element as------------
                                            64
 Then program generate output-------------
                  square root=8
 
PROGRAM-:
#include<iostream.h>
#include<conio.h>
#include<math.h>
void main()
{
clrscr();
int a;
float squareroot,cuberoot;
cout<<"enter the number";
cin>>a;
cout<<"\n"<<"square root of the number is"   ;
squareroot=sqrt(a);
cout<<squareroot;
getch();
}

0 comments:

Post a Comment

 
Copyright (c) 2010 Concepts Of C++. Design by WPThemes Expert

Blogger Templates and RegistryBooster.