Question: Write a JavaScript program called [YourLast NamelHw4aDivisibleby4.html.) which uses a while loop to print the numbers between 1 and 100, which are evenly divisible by

 Write a JavaScript program called [YourLast NamelHw4aDivisibleby4.html.) which uses a while

Write a JavaScript program called [YourLast NamelHw4aDivisibleby4.html.) which uses a while loop to print the numbers between 1 and 100, which are evenly divisible by 4 (e.g., 4, 8, 12, 16, 96, 100) One can use the modulus operator( %) to determine the remainder in a division problem, as follows (5 divided by 2 has a remainder of 1) (7 divided by 2 has a remainder of 1) (8 divided by 3 has a remainder of 2) (7 divided by 5 has a remainder of 2) (25 divided by 4 has a remainder of 1) (24 divided by 4 has a remainder of 0) 5%2 7%2 8%3 1 1 2 25 % 4 1 24 % 4-0 So, if a number x % 4 :0, that means x is evenly divisible by 4 (has no remainder, or a remainder of 0) Using counter controlled repetition, use a while loop to examine the integers 1 through 100, inclusive, using an if statement nested in the while loop to identify and print those numbers that are evenly divisible by 4 Here is the algorithm Set count to 1 While (count

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!