Given 3 int values, a b c, return their sum. However, if one of the values is 13 then it does not count towards the sum and values to its right do not count. So…
Sign up now. It's free!
See the full question with its answer and worked solution.
Given 3 int values, a b c, return their sum. However, if any of the values is a teen -- in the range 13..19 inclusive -- then that value counts as 0, except 15…
Sign up now. It's free!
See the full question with its answer and worked solution.
For this problem, we'll round an int value up to the next multiple of 10 if its rightmost digit is 5 or more, so 15 rounds up to 20. Alternately, round down to…
Sign up now. It's free!
See the full question with its answer and worked solution.
Given three ints, a b c, return true if one of b or c is "close" (differing from a by at most 1), while the other is "far", differing from both other values by…
Sign up now. It's free!
See the full question with its answer and worked solution.
Given three ints, a b c, one of them is small, one is medium and one is large. Return true if the three values are evenly spaced, so the difference between…
Sign up now. It's free!
See the full question with its answer and worked solution.
We want make a package of goal kilos of chocolate. We have small bars (1 kilo each) and big bars (5 kilos each). Return the number of small bars to use,…
Sign up now. It's free!
See the full question with its answer and worked solution.
This question involves dog walkers who are paid through a dog-walking company to take dogs for one-hour walks. A dog-walking company has a varying number of…
Sign up now. It's free!
See the full question with its answer and worked solution.
A teacher wants to analyze student-submitted text. You will write methods for a TextAnalyzer class. The class has a single instance variable: private String…
Sign up now. It's free!
See the full question with its answer and worked solution.
AP® and Advanced Placement® are registered trademarks of the College Board, which is not affiliated with, and does not endorse, Verityprep. Names are used for identification purposes only.