Answered step by step
Verified Expert Solution
Link Copied!
Question
1 Approved Answer

I have been stuck and having trouble understanding this question for days and I keep getting errors with my code I am currently using Java

I have been stuck and having trouble understanding this question for days and I keep getting errors with my code I am currently using Java with processing NOT PYTHON JAVA. This is a picture or the question and what the result is supposed to look like Question 2: Create a sketch named Q2_TwoSeven_firstname. The purpose of this program is to determine which of two entered numbers is closest to 27 without going over. The program will start by asking the user/student for two numbers. Each number must be stored in an appropriately named variable. These numbers are passed to a function, described below. This function returns a single value. Print the message the value returned is # where the # is the value returned by the function. Write a function according to the following criteria: accepts two integer parameters. returns the value of the parameter that is nearest to 27 without going over. returns zero if they both go parameters are greater than 27. returns zero if either parameter is zero or a negative number or if both are negative. Give your function an appropriate name based on the characteristics above.1 Some examples you can use to test your function: Parameters Return Value 19,272727,192718,5185,181819,281928,191918,181835,32028,29019,-10-1,190-5,-2018,000,900,00011Input ? Please enter number 1 OK CancelInput ? Please enter number 220 OK Cancel The value returned is 26

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

Principles Of Multimedia Database Systems

Authors: V.S. Subrahmanian

1st Edition

1558604669, 978-1558604667

More Books

Students explore these related Databases questions

Question

4. Are there any disadvantages?

Answered: 3 weeks ago