JAVASCRIPT/HTML/CSS..
MODIFY THE ORIGINAL CODE TO PRODUCE DESIRED PROBLEM RESULTS - MOST WORK WILL
BE IN JS ORIGINAL CODE IS PROVDED BELOW
*-----------------------------------------------------------------------------*
ORIGINAL CODE
*-----------------------------------------------------------------------------*
HTML:
Make Change
Change Calculator
*-----------------------------------------------------------------------------*
JAVASCRIPT:
const $ = selector => document.querySelector(selector);
*-----------------------------------------------------------------------------*
CSS:
body {
font-family: Arial, Helvetica, sans-serif;
background-color: white;
margin: auto;
width: 600px;
border: 3px solid blue;
}
h1 {
color: blue;
margin-top: 0;
}
main {
padding: 1em 2em;
}
div {
margin-bottom: 0.5em;
}
label {
float: left;
width: 16em;
text-align: right;
}
input {
margin-left: 1em;
}
#calculate {
margin-bottom: 1em;
}
*-----------------------------------------------------------------------------*
Extracted text: Problem 2 :Using JavaScript, create a simple web page that displays a Change Calculator, which allows the user to enter amount of change due (0 - 99) in cents, and output the number of each type of coins as change. Program Requirements: Your program must be written in JavaScript. In addition, you should follow the specific guidelines below. • The web page displays Change Calculator as below. It should include: o One input text box for the amount of change due in cents, and o Four disabled output text boxes for the number of quarters, dimes, nickels and pennies. one Calculate button. Change Calculator Enter amount of change due (0-99): 67 Calculate Quarters: 2 Dimes: 1 Nickels: 1 Pennies: 2 When the user clicks on the button Calculate, the program validates each of the input text box, and gives an alert dialog about the reason why the input is incorrect if the input is incorrect. The input is required and should be numeric and greater than 0. If the input correct, the four output text boxes will display the number of four different types of coins. Hint: Instruction about how to calculate the number of different coins: • The number of quarters = parseInt (input / 25) input_dime = input 25 The number of dimes = parseInt (input_dime/10) • input_nickels = input_dime10 The number of nickles = parseInt (input_nickles/5) The number of pennies = input_nickles 5