Page 1 of 1

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

Posted: Mon May 02, 2022 11:45 am
by answerhappygod
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
I Have Been Stuck And Having Trouble Understanding This Question For Days And I Keep Getting Errors With My Code I Am Cu 1
I Have Been Stuck And Having Trouble Understanding This Question For Days And I Keep Getting Errors With My Code I Am Cu 1 (48.77 KiB) Viewed 32 times
I Have Been Stuck And Having Trouble Understanding This Question For Days And I Keep Getting Errors With My Code I Am Cu 2
I Have Been Stuck And Having Trouble Understanding This Question For Days And I Keep Getting Errors With My Code I Am Cu 2 (47.72 KiB) Viewed 32 times
I Have Been Stuck And Having Trouble Understanding This Question For Days And I Keep Getting Errors With My Code I Am Cu 3
I Have Been Stuck And Having Trouble Understanding This Question For Days And I Keep Getting Errors With My Code I Am Cu 3 (25.63 KiB) Viewed 32 times
I Have Been Stuck And Having Trouble Understanding This Question For Days And I Keep Getting Errors With My Code I Am Cu 4
I Have Been Stuck And Having Trouble Understanding This Question For Days And I Keep Getting Errors With My Code I Am Cu 4 (25.53 KiB) Viewed 32 times
I Have Been Stuck And Having Trouble Understanding This Question For Days And I Keep Getting Errors With My Code I Am Cu 5
I Have Been Stuck And Having Trouble Understanding This Question For Days And I Keep Getting Errors With My Code I Am Cu 5 (23.2 KiB) Viewed 32 times
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, 27 27 27, 19 27 18,5 18 5, 18 18 19, 28 19 28, 19 19 18, 18 18 35, 32 0 28, 29 0 19,-1 0 -1, 19 0 -5, -2 0 18,0 0 0,9 0 0,0 0 01 1
Input ? Please enter number 1 OK Cancel
Input ? Please enter number 2 20 OK Cancel
х The value returned is 26