The web page must display a button. When a user clicks on the button, a prompt should show up, asking the user to enter any number. Upon entering the number, an alert should then show up with a message such as: 'The 5th power of "x" (x being the user's entered number) is "y" (with y being the result). In other words, the 5th power of a user's random entered number must be computed. How is this coded? This is the actual instruction: 'Create an HTML document and link a JavaScript file to the document in the document header. Write a function getAndShow() in the JavaScript file that will use a prompt dialog to ask the user for any number. Use the number returned by the prompt to compute the fifth power of that number and display it in a message box with a suitable message.'. There's also mention of a getAndShow() function that has to be added to the js file. Lastly, the images in the original questions are guidelines on what the code must produce.

Microsoft Visual C#
7th Edition
ISBN:9781337102100
Author:Joyce, Farrell.
Publisher:Joyce, Farrell.
Chapter5: Looping
Section: Chapter Questions
Problem 12E
icon
Related questions
Question
100%

The web page must display a button. When a user clicks on the button, a prompt should show up, asking the user to enter any number. Upon entering the number, an alert should then show up with a message such as: 'The 5th power of "x" (x being the user's entered number) is "y" (with y being the result). In other words, the 5th power of a user's random entered number must be computed. How is this coded?

This is the actual instruction: 'Create an HTML document and link a JavaScript file to the document in the document header. Write a function getAndShow() in the JavaScript file that will use a prompt dialog to ask the user for any number. Use the number returned by the prompt to compute the fifth power of that number and display it in a message box with a suitable message.'.

There's also mention of a getAndShow() function that has to be added to the js file.

Lastly, the images in the original questions are guidelines on what the code must produce.

Expert Solution
steps

Step by step

Solved in 4 steps with 4 images

Blurred answer
Knowledge Booster
JQuery and Javascript
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Microsoft Visual C#
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,
New Perspectives on HTML5, CSS3, and JavaScript
New Perspectives on HTML5, CSS3, and JavaScript
Computer Science
ISBN:
9781305503922
Author:
Patrick M. Carey
Publisher:
Cengage Learning