// Using the math library. // Try commenting out the #include and see what happens // when you complile and when you run. // // To compile this on a Unix machine you can use the following // // g++ -o sqrt_table sqrt_table.cpp // // This assumes g++ is your compiler (could be CC, xlc, etc). // -o sqrt_table tells the compiler what to name the resulting program. // // if you do this: g++ sqrt_table.cpp the compiler will compile your // program and put the result (the executable program) in the file named // a.out (this is the default file name for compiler output). #include #include int main(void) { int i; for (i=1;i<10;i++) { cout << sqrt(i) << endl; } return(0); }