id/email
password
forgot password | create account
about | help | code help+videos | done | prefs
CodingBat code practice

 

pais@kinetigram.com > L46_teenSum
prev  |  next  |  chance

APCS Logic 4, Problem 6. 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.


L46_teenSum(3, 4) → 7
L46_teenSum(10, 13) → 19
L46_teenSum(13, 2) → 19

...Save, Compile, Run (ctrl-enter)

public int L46_teenSum(int a, int b) { }

Editor font size %:
Shorter output


Forget It! -- delete my code for this problem

Progress graphs:
 Your progress graph for this problem
 Random user progress graph for this problem
 Random Epic Progress Graph

Java Help

Misc Code Practice

Difficulty: 200

Copyright Nick Parlante 2017 - privacy