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

 

byngcompsci@gmail.com > circleArea
prev  |  next  |  chance

circleArea() -- given a radius, return the area of the corresponding circle. Use 3.14 for the value of pi.


circleArea(10) → 314.0
circleArea(2) → 12.56
circleArea(-10) → 314.0

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

public double circleArea(int 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: 10

Copyright Nick Parlante 2017 - privacy