Sumac Sequences (CCC/2011/J3)

Challenge A sumac sequence is made by beginning with two integer terms  and , and then producing more terms according to the following rules (starting with the third term): If a term is produced that is greater than the term before it, the sequence terminates (no new terms are produced). For example, the starting terms 120 and 71 produce theContinue reading “Sumac Sequences (CCC/2011/J3)”

What kind of triangle? (CCC/2014/J1)

Challenge Define a function, TriangleType, that decides if a triangle is equilateral, isosceles, or scalene (or not a triangle at all).  Your input will be three integers, each representing the measure of one interior angle.  Your output should be “equilateral”, “isosceles”, “scalene”, or “not even a triangle”. Original problem description on CEMC website. Sample Output: Background InformationContinue reading “What kind of triangle? (CCC/2014/J1)”