C program to print square and square root

// Printing square and square root using c program
#include<stdio.h>
#include<conio.h>
#include<math.h>
void main()
{
int i=0,sqr;
float sq;
clrscr();
printf("Value   Square Root   Square");
while(i<=100)
{
printf("\n");
sq=sqrt(i);
sqr=i*i;
printf("%d\t%f\t%d",i,sq,sqr);
i=i+10;
}
getch();
}

Output

c program square root



No comments: