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

 

jebbert@volusia.k12.fl.us > funkySum
prev  |  next  |  chance

Write a method that returns the "funky sum" of two integers. The funky sum is just the normal sum of the integers UNLESS one of the integers is exactly double the other one. In that case, the funky sum has an extra zero at the end. For example, funkySum(2,4) returns 60 (because 2+4 is 6 and then there is a zero added to the end making it 60).


funkySum(4, 5) → 9
funkySum(3, 6) → 90
funkySum(0, 0) → 0

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

public int funkySum(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: 250

Copyright Nick Parlante 2017 - privacy