Description
$300-$399
$400-$499
$500-$599
$600-$699
$700-$799
$800-$899
$900-$999
$1000 and over
You will need to declare two arrays, one to hold the salary range and the other to accumulate the count of salespeople in that range.When you have to check for a range you store either the lowest value in each range in the array and compare the salary to each of those values or you can store the highest value and compare to that. The only change will be the relational operator that you use for your comparison.Which ever configuration you decide to use should be duplicated in a parallel counter array so that when you determine which range the sales fit into you have the subscript for the counter array already determined.Your output should list the salary range and the number of salespeople in that range.Write the Flowchart, and JavaScript code for the following programming problem based on the pseudocode below.
Last year, a local college implemented rooftop gardens as a way to promote energy efficiency and save money. Write a program that will allow the user to enter the energy bills from January to December for the year prior to going green. Next, allow the user to enter the energy bills from January to December of the past year after going green. The program should calculate the energy difference from the two years and display the two years worth of data, along with the savings.
Hints: Create three arrays of size 12 each. The first array will store the first year of energy costs, the second array will store the second year after going green, and the third array will store the difference. Also, create a string array that stores the month names. These variables might be defined as follows:
notGreenCost = [];
goneGreenCost = [];
savings = [];
You will also need an array to hold the month names:
months = [“January”, “February”, “March “, “April “, “May “, “June “, “July “, “August”, “September”, “October”, “November”, “December”];
The extra spaces in March – June help in lining up the output shown below.
Your sample output might look as follows:






