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

 

apcsaArraysBoxVolume


Given the dimensions of a cardboard box in the format "LxWxH" (Length x Width x Height), calculate and return the total volume of the box as an integer.


HINT: Cool thing about the String split method, it can use different delimiters (what comes between the desired values).  This time, the delimiter isn't a space but it's definitely there.

apcsaArraysBoxVolume("1x2x3") → 6
apcsaArraysBoxVolume("5x5x5") → 125
apcsaArraysBoxVolume("10x10x10") → 1000

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

public int apcsaArraysBoxVolume(String dimensions) { }

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

Copyright Nick Parlante 2017 - privacy