Question

The code should be written in HTML 5. Thanks! Develop a script that will determine whether...

The code should be written in HTML 5. Thanks! Develop a script that will determine whether a department-store customer has exceeded the credit limit on a charge account. For each customer, the following facts are available: a) Account number b) Balance at the beginning of the month c) Total of all items charged by this customer this month d) Total of all credits applied to this customer's account this month e) Allowed credit limit The script should input each of these facts from a prompt dialog as an integer, calculate the new balance (= beginning balance + charges - credits), display the new balance and determine whether the new balance exceeds the customer's credit limit. For customers whose credit limit is exceeded, the script should output HTML5 text that displays the message "Credit limit exceeded."

0 0
Add a comment Improve this question Transcribed image text
Answer #1

<!DOCTYPE html>
<html>
    <script>
      var account_no=parseInt(prompt("Enter your account number : ","000"));
      var balance=parseInt(prompt("Enter your balance at the beginning of the month : ","000"));
      var total_item=parseInt(prompt("Enter your total of all items charged :",""));
      var total_credit=parseInt(prompt("Enter your total of all credits :",""));
      var allow_credit=parseInt(prompt("Enter your allowed credit limit :",""));
      var new_balance=parseInt(balance+total_item-total_credit);
      document.write("<h1> The new balance is "+new_balance+"</h1>");
      if(new_balance>allow_credit)
      document.write("Your credit limit is exceeded.");
    </script>
</head>

<body>
  
</body>
</body>

</html>

Add a comment
Know the answer?
Add Answer to:
The code should be written in HTML 5. Thanks! Develop a script that will determine whether...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • i need to Develop a script in java script that will determine whether a department-store customer...

    i need to Develop a script in java script that will determine whether a department-store customer has exceeded the credit limit on a charge account. For each customer, the following facts are available: a) Account number b) Balance at the beginning of the month c) Total of all items charged by this customer this month d) Total of all credits applied to this customer's account this month e) Allowed credit limit The script should input each of these facts from...

  • 7.11 Drivers are concerned with the mileage obtained by their automobiles. One driver has kept track...

    7.11 Drivers are concerned with the mileage obtained by their automobiles. One driver has kept track of several tankfuls of gasoline by recording the number of miles driven and the number of gallons used for each tankful. Develop a script that will take as input the miles driven and gallons used (both as integers) for each tankful. The script should calculate and output HTML5 text that displays the number of miles per gallon obtained for each tankful and the combined...

  • Write a Java application that determines whether any of several department store customers has exceeded the...

    Write a Java application that determines whether any of several department store customers has exceeded the credit limit on a charge account. For each customer, the following facts are inputted: -Balance at beginning of month -Total amount of all items charged by the customer this month -Total amount of all credits applied to the customer’s account this month -Allowed credit limit Use the value of -1 as a sentinel value to quit the program. The program should input all these...

  • This C++ Program should be written in visual studio 2017 You are to write a program...

    This C++ Program should be written in visual studio 2017 You are to write a program that can do two things: it will help users see how long it will take to achieve a certain investment goal given an annual investment amount and an annual rate of return; also, it will help them see how long it will take to pay off a loan given a principal amount, an annual payment amount and an annual interest rate. When the user...

  • write a code on .C file Problem Write a C program to implement a banking application...

    write a code on .C file Problem Write a C program to implement a banking application system. The program design must use a main and the below functions only. The program should use the below three text files that contain a set of lines. Sample data of these files are provided with the assessment. Note that you cannot use the library string.h to manipulate string variables. For the file operations and manipulations, you can use only the following functions: fopen(),...

  • Use the following to answer questions 5-8 Bank Reconciliation: Identify whether the item should be added...

    Use the following to answer questions 5-8 Bank Reconciliation: Identify whether the item should be added or subtracted from the bank balance or the company balance. Use the number 1-4) for your response. For instance, if the amount should be added to bank statement balance you would input 1. 1. Added to bank statement balance 2. Subtracted from bank statement balance 3. Added to company cash balance 4. Subtracted from company cash balance 6 7 8 Item Bank deducted too...

  • Use the following to answer questions 1-4 Determine whether the firm reports each of the following...

    Use the following to answer questions 1-4 Determine whether the firm reports each of the following items as part of cash, cash equivalents, or neither in the balance sheet Item Cash, Cash equivalent, or neither 1 Inventory for sale to customers Investment with a maturity of 80 days at purchase Three month US Treasury Bill Bank deposits Use the following to answer questions 5-8 Bank Reconciliation: Identify whether the item should be added or subtracted from the bank balance or...

  • This assignment must be completed on your own with your team mates. Don't give your code...

    This assignment must be completed on your own with your team mates. Don't give your code to others or use other students' code. This is considered academic m will result 0 marks) Write a java program that mange JUC Bank accounts services. The program should have the following: The total number of accounts (n) will be specified by the user at the beginning of the program. Depending upon the entered number, create three Arrays as following o o o Array...

  • Determine whether management should accept or reject the new business. Accept Reject Goshford Company produces a...

    Determine whether management should accept or reject the new business. Accept Reject Goshford Company produces a single product and has capacity to produce 135,000 units per month. Costs to produce its current sales of 108,000 units follow. The regular selling price of the product is $118 per unit. Management is approached by a new customer who wants to purchase 27,000 units of the product for $80.10 per unit. If the order is accepted, there will be no additional fixed manufacturing...

  • QUESTION 1 4 pa Determine whether the normal balance of each account is a debit or...

    QUESTION 1 4 pa Determine whether the normal balance of each account is a debit or credit balance - Dividends - Revenues 1. Debit - Deferred/Unearned revenue 2. Credit - Accounts payable - Expenses QUESTION 2 1.5 pc When a company performs a service but does not receive cash at the time of service, revenue is credited, tell me which account will be debited? O cash accounts payable o accounts receivable dividends QUESTION 3 On January 8, Nickel Corporation purchased...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT