Write a program to print the square root of the first 10 natural numbers
Answers
Answered by
1
Explanation:
Solution:
#include<stdio.h>
#include<math.h>
int main()
{
int i=1;
float square_roots;
/* Calculating and printing square-roots of number 1 to 9*/
printf("Square roots of numbers from 1 to 9 are:\n\n");
for(i=1;i<=9;i++)
{
square_roots=sqrt(i);
printf("\t%d = %.2f\n",i,square_roots);
}
return 0;
}
plz follow me (*_*)
Similar questions
Science,
2 months ago
English,
2 months ago
Political Science,
4 months ago
Math,
9 months ago
Math,
9 months ago