##### ###### ##### ### # # ### # # ###### ## ## ## ## ## ## ## # # # # # ## ##### #### ##### # # # # # # # #### ## # ## ## ## ## # # # # # ## ## # ###### ## ### # ### # ######
##### ###### ##### ### # # ### # # ###### ## ## ## ## ## ## ## # # # # # ## ##### #### ##### # # # # # # # #### ## # ## ## ## ## # # # # # ## ## # ###### ## ### # ### # ######
Stop repeating yourself. Learn to define reusable blocks of code, pass data in, get results back, and organize your programs into logical pieces.
Why functions matter
The core concept
How to write one
Running the code
Functions that just do work
Function types
How functions give results
Code organization
Input terminology
How data flows in
Function inputs
Write your first function
More than one value
Setting fallback values
Function inputs
Signatures vs implementations
Reusing across files
Boolean return type
Where variables live
Understanding #include
Creation and destruction
Multiple versions
Functions calling themselves
Code organization
Small reusable pieces
Celsius to Fahrenheit
Checking number parity
Test your understanding
Returning the larger value
Multiple parameters
Using void functions
Checking bounds
Recursion or loops
Checking divisibility
Test your understanding
Pass by value limits
Iterative or recursive
Fitting dominoes on a board
Think about total space
Breaking down the solution
Post-check loop
Complete solution
summary
Checking force balance
Add each dimension separately
Breaking down the solution
Code organization
Complete solution
summary
What we learned