/* * Example of the while statement * * print a table of square roots */ #include #include int main(void) { int i, n; printf("Enter number of entries in table >"); scanf("%d",&n); i = 1; while (i <= n){ printf("%8d%10.4f\n",i, sqrt((double) i)); /* use of type cast*/ // i = i + 1; i += 1; /*compound assignment operator*/ } return 0; }