From the course: C Essential Training

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Challenge: Do some math

Challenge: Do some math - C Tutorial

From the course: C Essential Training

Start my 1-month free trial

Challenge: Do some math

(upbeat 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-challenge1 to help get you 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 the value 15 to variable a. Assign variable a divided by 2 to variable b, and finally, assign the value of variable b multiplied by 4 to variable c. This challenge should take you under 10 minutes to complete.

Contents