Please complete the following exercises on this page. When complete post this page to your server. Make a link in your WDV221 homework page for this assignment.
Include a comment in each script with the exercise number and a description of what the script is supposed to do.
Using Blackboard submit this Assignment.
Create a function called totalSales( ).
Use a button to call the function.
The function will start a loop that will ask you for a number until you tell the function that you do not have any more numbers to enter.
The number you enter will be added to an accumulator variable.
The loop will count how many numbers were entered.
The loop will ask you if you have more numbers to enter. If you enter ‘yes’ the loop will continue. If you enter 'no' the loop will stop.
Once the loop stops you should display a message that says how many numbers you entered and the total amount of the numbers you entered.
Format the message area to make it easy to find and read.
Note: This type of loop is often used when asking the customer or user for input. Most of the time we do not know how many items the customer has to enter. For example: You need to order a number of products and the loop will ask you for the name, quantity and price for each product. It will keep asking you until you do not have any items left to enter. It will then end the loop and complete its processing.