For many families at Christmas, each family member gives 1 present to every other family member. The main exception is that children under the age of 16 do not contribute any presents. If there is only 1 child in the family, then that child is considered "spoilt" and receives 2 presents from each adult instead.
Given the size of a family (Nf) and the number of children under the age of 16 (Nc), find the number of presents under the Christmas tree!
Solution Stats
Problem Comments
Solution Comments
Show comments
Loading...
Problem Recent Solvers176
Suggested Problems
-
The Goldbach Conjecture, Part 2
2413 Solvers
-
1941 Solvers
-
String Array Basics, Part 2: Convert String Array to Cell Array; No Missing Values
151 Solvers
-
Convert from Fahrenheit to Celsius
27615 Solvers
-
Solve a System of Linear Equations
14180 Solvers
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!