solution

Q1. Write a JavaScript that asks the user to enter a number and find whether the number is even or odd.

Q2. Write a JavaScript that asks the user to enter a number and find its factorial.

Q3.Write a script that finds the smallest of several nonnegative integers. Assume that the firstValue read specifies the number of values to be input from the user.

Q4. Write a JavaScript that asks the user to enter 3 integers and find the largest integer.

Q5.Write a script that calculates the product of the odd integers from 1 to 15, then outputs HTML5 text that displays the results.

Q6.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.”

 
"Looking for a Similar Assignment? Get Expert Help at an Amazing Discount!"
Looking for a Similar Assignment? Our Experts can help. Use the coupon code SAVE30 to get your first order at 30% off!

Hi there! Click one of our representatives below and we will get back to you as soon as possible.

Chat with us on WhatsApp