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

 

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

Write a method that returns the sum of some integer parameters. Always include num1 and num2 in the sum. Only include num3 in the sum if 'includeLast' is true. Look at the test data for examples.


test2021_09_02_APSLHL_addThem(128, 256, 512, true) → 896
test2021_09_02_APSLHL_addThem(-124, -235, -215, false) → -359
test2021_09_02_APSLHL_addThem(1, 2, 4, true) → 7

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

public int test2021_09_02_APSLHL_addThem(int num1, int num2, int num3, boolean includeLast) { }

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: 230

Copyright Nick Parlante 2017 - privacy