Question: java language 14. Write a program that asks the user to enter a number 'z' to do: (35%) a. Count numbers between 1 to z
14. Write a program that asks the user to enter a number 'z' to do: (35%) a. Count numbers between 1 to z that are divisible to 4, for example if z=13, there are 3 numbers that divisible to 4 which are 4,8 and 12, An example of the program is: IND DD (25%) run: Enter 2:13 Counter of 4's divisibles:3 BUILD SUCCESSFUL (total time: 4 seconds) b. If the program reaches 100, it should stop counting and print a message as this example shows: (10%) ID DD run: Enter 2:117 100 is reached stop counting Counter of 4's divisibles:25 BUILD SUCCESSFUL (total time: 7 seconds)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
