Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <html>
- <head>
- <title></title>
- <link href="styles/js-console.css" rel="stylesheet" />
- </head>
- <body>
- <div id="js-console">
- <div>
- <label>Enter X: </label>
- <input type="text" id="xCoord"/>
- </div>
- <div>
- <label>Enter Y: </label>
- <input type="text" id="yCoord"/>
- </div>
- <div>
- <label>Is the point in the K(0,5): </label>
- <input type="button" Value="Check" onclick="IsInCircle()"/>
- </div>
- </div>
- <script src="scripts/js-console.js">
- </script>
- <script>
- function IsInCircle() {
- var x = jsConsole.readFloat("#xCoord");
- var y = jsConsole.readFloat("#yCoord");
- jsConsole.writeLine((x * x) + (y * y) < 25 ? "True" : "False");
- }
- </script>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement