Wednesday, 10 July 2013


C++ Program to generate square root of 1 to 10 numbers

Code:
/*C++ Program to generate square root of 1 to 10 numbers*/
#include<iostream.h>
#include<conio.h>
int main()
{
 clrscr();
 int num;
 double sq_root;
 for (num; num<10: num++)
 {
 sq_root = sqrt((double)num);
 cout << num << " " << sq_root << '\n';
 }
 getch();
 return 0;
}

Sample Output:



Comment bellow for your Query and Feedback

Related Posts :



1 comment:

  1. How can i find a suqare root of a number in c++ using inline function....

    ReplyDelete