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

 

calcWeight


Write a method that calculates the weight of a copper disk of a given radius, r cm, if the density is 5.0 grams / square cm. Note that the disks are of all the same thickness, and the density is for that thickness. *** USE 3.14159 for the value of pi.***


calcWeight(1.0) → 15.70795
calcWeight(2.0) → 62.8318
calcWeight(3.0) → 141.37154999999998

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

public double calcWeight(double r) { }

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

Copyright Nick Parlante 2017 - privacy