Question: What to do: Download Quiz2.java program. The program prompt user to input an Based on the value of n, the program displays one of

What to do: Download Quiz2.java program. The program prompt user to input

What to do: Download Quiz2.java program. The program prompt user to input an Based on the value of n, the program displays one of the following m In is divisible by only 3 In is divisible by only 7 In in divisible by both 3 and 7 n is not divisible by neither 3 or 7 where n is the value input by user. Examples: if n, input by the user is equal to 33, then program should prin 33 is divisible by only 3 for n = : 35, the output should be 35 is divisible by only 7 for n = 21, the output should be 21 is divisible by both 3 and 7 if n = 31, the output should be 31 is not divisible by neither 3 or 7 Note: to find if n is divisible any a number, use %(modulus) For example if (n%2==0) System.out.println(n+" is divisible by 2"); Show your solution to your TA for marking. Total mark: 6

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 Programming Questions!