// Compile this with: // gcc -o math 02-math.c -lm // then run it: // ./math #include #include int main(void) { int i; int x; printf("hello\n\n"); /* print the 7-times table */ for (i = 0; i<13; ++i) { int p = 7 * i; printf("7 * %d = %d\n", i, p); } printf("\n"); // a blank line /* print a table of the sine function */ for (x = 0; x <= 360; x += 15) { double r = M_PI/180 * x; double y = sin(r); printf("sin(%d) = %f\n", x, y); } printf("\n"); return 0; }