about | help | code help+videos | done | prefs |
is_square_root
Complete the function squareRoot that will result in the following solution of isSquareRoot to pass the tests provided. Due to the nature of codingbat, you need to copy the partially-completed template below into the answer box first. boolean isSquareRoot(double a, double b) { double root = squareRoot(a); if(Math.abs(a - b*b) <= a/100.0) { return true; } return false; } double squareRoot(int val) { //to be completed } is_square_root(10.5, 3.24) → True is_square_root(1729.6174, 41.58) → True is_square_root(10.5, 3.23) → True ...Save, Compile, Run (ctrl-enter) |
Progress graphs:
Your progress graph for this problem
Random user progress graph for this problem
Random Epic Progress Graph
Difficulty: 6 Post-solution available
Copyright Nick Parlante 2017 - privacy