From the course: Complete Guide to C Programming Foundations
Unlock the full course today
Join today to access over 24,300 courses taught by industry experts.
Challenge: Do some math - C Tutorial
From the course: Complete Guide to C Programming Foundations
Challenge: Do some math
(bright music) - [Instructor] In this challenge, you're going to do some math, or more precisely, the computer is going to do some math. You're going to code the equations. Use the source code from Exercise File 03_02-challeng1.c to help you get started. Declare three variables, a, b, and c. Add assignments for these three variables, a, b, and c, as shown by a comment in the code. Assign to variable a the value 15. Assign to variable b the value of variable a divided by 2. And finally, assign to variable c the value of variable b multiplied by 4. This challenge should take you under 10 minutes 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
-
-
-
-
-
-
-
-
-