Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please write the program in Java The function level(a,b,c,d) is a function that divides the largest of its integer arguments by 2. If more than

image text in transcribed

Please write the program in Java

The function level(a,b,c,d) is a function that divides the largest of its integer arguments by 2. If more than one argument are equal and are the largest, they are divided by 2 For example given a=1,b=2, 4,d=8, levela.b.c.d) changes dto 4 A second call level(a,b,c,d) would change both c and d to 2 a) Write the code of the function level (4 pts) b) To test it, write a program that initializes a = 100: b = 200, 400, 800, then calls levelab.c,d) 10 times in a for loop. In each call display the new values of a, b, c, and d. (6 pts)

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

Step: 3

blur-text-image

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

Data Management Databases And Organizations

Authors: Richard T. Watson

2nd Edition

0471180742, 978-0471180746

More Books

Students also viewed these Databases questions