// printf, scanf, etc. #include // rand, srand #include // time functions #include // pi, sin, cos, exp #include int get_int() { int val; // note: you pass in the address scanf("%d", &val); printf("you typed %d\n",val); return val; } int get_rand() { int x = rand(); return x%10; } int main() { // call scanf int junk = get_int(); // set random seed srand(time(NULL)); //srand(2); int x = get_rand(); printf("x = %d\n", x); int y = get_rand(); printf("y = %d\n", y); // do math float a = 12.0f, b = 55.0f, e = 2.7182818f; printf("cos(a) = %f\n", M_PI);//cos(a)); printf("sqrt(b) = %f\n", sqrt(b)); printf("log(e) = %f\n", log(M_E)); return 0; }