Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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 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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started