C++ Program to generate square root of 1 to 10 numbers
Code:
Sample Output:
Comment bellow for your Query and Feedback
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;
}
#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
How can i find a suqare root of a number in c++ using inline function....
ReplyDelete