This is the 5th lecture in a first-year programming course that I am teaching at the University of Toronto, delivered on January 19, 2022.
In this lecture, we introduced more functions from the math library, including fmax(), fmin(), fabs(), floor(), ceil(), and rint(). We used the rint() function to solve a problem, called "Canada has no pennies." We also introduced the pseudo-random number generator in C, rand(), and explained why we need to seed the generator using srand(). We explained the need to use the current time in UNIX timestamp as an integer to see our random number generator, and went a bit further into what the UNIX timestamp is.