#include<stdio.h>
#include<conio.h>
#include<math.h>
void main()
{
float i,j;
clrscr();
gotoxy(25,1);
printf("Square Root Table\n");
for(j=0;j<=9;j++)
{
printf("\n");
for(i=0 ; i<=1; i= i + 0.1)
{
if(j==0)
printf(" %2.1f | ",i);
elseif (i==0)
printf(" %2.1f | ",j);
elseif (i!=0 && j !=0)
printf(" %3.1f | ",sqrt(i+j));
}
}
getch();
}
/*
********
OUTPUT
********
Square Root Table
0.0 | 0.1 | 0.2 | 0.3 | 0.4 | 0.5 | 0.6 | 0.7 | 0.8 | 0.9 |
1.0 | 1.0 | 1.1 | 1.1 | 1.2 | 1.2 | 1.3 | 1.3 | 1.3 | 1.4 |
2.0 | 1.4 | 1.5 | 1.5 | 1.5 | 1.6 | 1.6 | 1.6 | 1.7 | 1.7 |
3.0 | 1.8 | 1.8 | 1.8 | 1.8 | 1.9 | 1.9 | 1.9 | 1.9 | 2.0 |
4.0 | 2.0 | 2.0 | 2.1 | 2.1 | 2.1 | 2.1 | 2.2 | 2.2 | 2.2 |
5.0 | 2.3 | 2.3 | 2.3 | 2.3 | 2.3 | 2.4 | 2.4 | 2.4 | 2.4 |
6.0 | 2.5 | 2.5 | 2.5 | 2.5 | 2.5 | 2.6 | 2.6 | 2.6 | 2.6 |
7.0 | 2.7 | 2.7 | 2.7 | 2.7 | 2.7 | 2.8 | 2.8 | 2.8 | 2.8 |
8.0 | 2.8 | 2.9 | 2.9 | 2.9 | 2.9 | 2.9 | 2.9 | 3.0 | 3.0 |
9.0 | 3.0 | 3.0 | 3.0 | 3.1 | 3.1 | 3.1 | 3.1 | 3.1 | 3.1 |
*/