Question: In HTML write a program that calculates and displays all factors of a number with a function. A factor is any number that divides into
In HTML write a program that calculates and displays all factors of a number with a function. A factor is any number that divides into a number evenly.
For examples: Factors of 20 are 1,2,4,5,10,20
For the program:
- Prompt the user for a number or use an input
- Call a function to calculate all factors using loops and conditionals and modulus
- Display all factors to the page
Bonus +5
If the factor is Even : Print it in Green
If The Factor is Odd : Print it in Red
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
