CCSF CNIT 133 – JavaScript
Homework 4 – Looping Statements
This is a two task section:
Part 1a) calculate the product and sum of every third integer
from 5 - 20 using the for statement
Part 1b) calculate the product and sum of every fourth integer
from 3-31 using while / do while statement
Display the gross pay for six employees. The company pays "straigt time" for the first 40 hours worked by each employee and pays "time and a half" for all hours worked in excess of 40 hours.
Calculate compound interest on a principal of $1000 with annual
interest rates between 5 to 10% for a period between 1 to
10 years.
The formula used is: A=P(1 +r)
n
Display the total amount of products sold from a mail-order
business.
The business sells 5 products:
Display list variations. The options are: unordered list, ordered number list, and ordered letter list.
Print "The Twelve Days of Christmas" song using repetition and switch statement(s)