IT Lesson
Pages
Home
Tuesday, February 10, 2015
C Program to calculate square root of any number
#include<iostream.h>
#include<conio.h>
#include<math.h>
void main()
{
clrscr();
float sq,n;
cout<<"Enter any number:";
cin>>n;
sq=sqrt(n);
cout<<"
Square root
of "<<n<<" is "<<sq;
getch();
}
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.