Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

C# please !!!! with screan shot LabsB: Sensible Division Heads up! You will need to use the modulus function for the question. If you do

C# please !!!!
with screan shot image text in transcribed
LabsB: Sensible Division Heads up! You will need to use the modulus function for the question. If you do not know or have any questions about this function, please ask your Lab Instructor. A brief explanation of the function is presented below. The modulus function, which looks like this \%, is a function that can be used in the Java, CA, and C++ programming languages much like the division /, multiplication *, addition +, and subtraction functions. This function is like the division function, however, the idea behind it is that it should provide you with the remainder of two divided integers (think long division) rather than with the answer of that division. For example, if we were to integer divide 5 and 2( int w=5,2) the answer of this division would be 2 (remember this is integer division). However, if we were to mod 5 and 2 (int w=5s 2) then the answer would be 1 . Keeping that in mind, if we were to mod the number that is left of the modulus sign with a number that it is divisible by on the right of the modulus sign, what would the answer be? For this exercise, please design a program that determines if the number that was entered in as input by the user is divisible by 2,3, or 5 . If it is not divisible by any of these numbers, please just print out "This number is undetermined". Disclaimer: The answer that should be provided by your program should be the smallest number that equally divides by the number entered in. For example, 200 in sample output \#2 is both divisible by 2 and by 5, hovever, your program should prioritize printing out it is divisible by 2 rather than it being divisible by 5. Only numbers that are strictly divisible only by 5 should print "This number is divisible by 5 " for example like 25 . Remember, the class name should be Lab.5B. The user input should be an integer and sample runs are shown below. User input is in bold. Note: You must use a switch statement as gart of your solution. Sample output 41: Enter an integer: 2 This number is divisible by 2 Sample output #2 : Enter an integer: 200 This number is divisible by 2 . Sample output +3 : Enter an integer: 13 This number is undetermined Sample output 43 t Enter an integer: 25 This number is divisible by 5

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

4. What is the subject of the report?

Answered: 1 week ago