In this challenge, you must declare variables of the proper data type and assign values to each based on mathematical equations. To get the computer to generate the proper answer, an expression must be presented to match the result desired.
(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. … …
- Writing your first C program
- Working the C development cycle
- Adding comments to code for clarity
- C language data types
- Declaring variables
- Making new data types
- Typecasting variables
- Using math, assignment, and logical operators
- Creating for and while loops
- Nesting loops
- Creating functions
- Returning values from functions
- Passing arguments to functions
- Creating recursive functions
Skill Level Intermediate
C: Data Structures, Pointers, and File Systemswith Dan Gookin2h 57m Intermediate
1. The Fundamentals of C
2. Variables and Values
3. Operators and Math
4. Decisions and Loops
Next steps1m 38s
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.