From the course: Complete Guide to C Programming Foundations

Chapter challenge: More math

(upbeat music) - [Instructor] Time to prove your programming skills by concocting a series of mathematical operations, as shown in the Challenge File here. Your task is to add printf() statements that output the results of each operation as indicated by these comments. Replace each comment in the Exercise File with the appropriate mathematical operation. Variables a and b are provided by input already in the code. For each operation, write a printf() statement outputting the variables values and the results. For example, the output can look like this, 5 + 11 = 16 This type of output is repeated for each of the given operations, addition, subtraction, multiplication, division, modulo, and the bit shift right and bit shift left operators. Wite the proper printf() statement outputting the values, as shown, along with our operators and the result. This challenge should take 10 minutes or less to complete.

Contents