From the course: Complete Guide to C Programming Foundations
Chapter challenge: More math - C Tutorial
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
-
-
-
-
-
Working with math operators3m 13s
-
(Locked)
Challenge: Do some math50s
-
(Locked)
Solution: Do some math1m 47s
-
(Locked)
Using assignment operators1m 49s
-
(Locked)
Obeying the order of precedence3m 14s
-
(Locked)
Challenge: Get the order correct55s
-
(Locked)
Solution: Get the order correct1m 37s
-
(Locked)
Working with relational operators3m 48s
-
(Locked)
Using logical operators3m 58s
-
(Locked)
Understanding bitwise operators3m 44s
-
(Locked)
Shifting bits3m 13s
-
(Locked)
Exploring unary operators3m 3s
-
Chapter challenge: More math1m 8s
-
(Locked)
Chapter solution: More math2m 45s
-
-
-
-
-
-
-
-
-