Question: Point in a Circle (filename: pointincircle.html) ~ Write JavaScript code that uses a prompting box to ask the user to enter the radius of a

Point in a Circle (filename: pointincircle.html) ~

Write JavaScript code that uses a prompting box to ask the user to enter the radius of a circle whose center is at (0, 0). The code then randomly generates a point(x, y), where the ranges of x and y are [-radius, radius), and checks and displays (in an alert box) whether the point is inside the circle. All the values are floating-point numbers.

Note: For quick development of certain JavaScript programs that do not have any interaction with a webpage, you don't need anything in the page body and just simply put your code in a script block between the closing body tag and before the closing html tag as shown below

..

please make this program in .html

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!