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

 

tmhscs@gmail.com logic > logic_absoluteValue
prev  |  next  |  chance

Write a method that will return the absolute value of double "x".


logic_absoluteValue(2.5) → 2.5
logic_absoluteValue(-3.75) → 3.75
logic_absoluteValue(-95.7) → 95.7

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

public double logic_absoluteValue(double x) { }

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

Post-solution available

Copyright Nick Parlante 2017 - privacy