Project 99: Simplifying Square Roots

Simplifying Values inside Square Roots

 Project 99: Variables 'inside' and 'outside' have been initialized.  There is also a working method called isPerfectSquare.

inside represents the radicand which is the value inside the square root (50 for example 1)

outside represents the value that is being multiplied in front of the square root (2 for example 2)

isPerfectSquare(x) returns true if x is a perfect square; false otherwise.

example: isPerfectSquare(36) returns true

example: isPerfectSquare(20) returns false

Task: Appropriately initialize values for 'simplifiedOutside' and 'simplifiedInside' that represent the inside and outside values after the square root has been simplified.

From Example 1: If 'inside' is 50 and 'outside' is 2, then simplifiedOutside should be 10 and simplifiedInside should be 2.

**If your code works for 5 test cases, you can enter your e-mail address

Universal Computational Math Methods:

pow(5,2) returns 25.0

abs(-3.0) returns 3

sqrt(49.0) returns 7.0