Question: Java Python Logic-1 > teenSum prev next | chance Given 2 ints, a and b, return their sum. However, teen values in the range 13..19

 Java Python Logic-1 > teenSum prev next | chance Given 2ints, a and b, return their sum. However, "teen" values in the

Java Python Logic-1 > teenSum prev next | chance Given 2 ints, a and b, return their sum. However, "teen" values in the range 13..19 inclusive, are extra lucky. So if either value is a teen, just return 19. teen Sum(3, 4) +7 teenSum(10, 13) 19 teenSum(13, 2) 19 Go ...Save, Compile, Run (ctrl-enter) public int teenSum(int a, int b) { } Java Python Logic-1 > maxMod5 prev next chance Given two int values, return whichever value is larger. However if the two values have the same remainder when divided by 5, then the return the smaller value. However, in all cases, if the two values are the same, return O. Note: the % "mod" operator computes the remainder, e.g. 7 % 5 is 2. maxMod5(2, 3) 3 maxMod5(6, 2) 6 maxMod5(3, 2) 3 Go ...Save, Compile, Run (ctrl-enter) public int maxMod5(int a, int b) {

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!