1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Goryan [66]
2 years ago
10

Write a program that displays the middle value of three unduplicated input values. Hint: Review the four solutions in the smalle

st number case study in this chapter. Consider how easy or hard it would be to modify each of those algorithms to find the middle value rather than the smallest value. Then modify the algorithm you consider most appropriate for this problem.
Computers and Technology
1 answer:
kkurt [141]2 years ago
5 0

Answer:

The code is in java.

Explanation:

import java.util.Scanner;  

class Main{  

   public static void main(String[] args) {

       System.out.println("Enter 3 different numbers");

       Scanner obj = new Scanner(System.in);

       int a = obj.nextInt();

       int b = obj.nextInt();

       int c = obj.nextInt();

       System.out.println("The middle element is : ");

       //Check if a is the middle

       if(a>b&&a<c || a>c&&a<b){

           System.out.println(a);

       }

       //Check if b is the middle element

       else if(b>a&&b<c || b<a&&b>c){

           System.out.println(b);

       }

       else{

           System.out.println(c);

       }

   }

}  

OUTPUT:-

You might be interested in
What does a computer need from people in order to solve problems effectively?
dimulka [17.4K]

Answer:

Computers can solve problems by performing billions of operations per second. A programmer's job is to find solutions. They do this by breaking down problems into easy-to-follow steps for a computer. Programming languages allow people to communicate with computers.

Although computers play an important supporting role as a tool in the discipline, they are just that–tools. ... Given a problem, a computer scientist's goal is to develop an algorithm, a step-by-step list of instructions for solving any instance of the problem that might arise.

Explanation:

Pleeeeeeez mark Me as BRAINLIEST

3 0
3 years ago
Please help I really need it :(
Arada [10]

Answer:

im sorry dont know

Explanation:

3 0
2 years ago
Why won't Brainly let me create an account? I have tried many times but it just loads.
Alex73 [517]

Answer:

Try checking your location or number

8 0
2 years ago
What feature new to Windows Server 2012 provides the ability to find identical sets of data on a SAN based storage array and red
igor_vitrenko [27]

Answer:

Data Deduplication

Explanation:

In computing, data deduplication is a technique for eliminating duplicate copies of repeating data. This is also called single-instance storage.

Only applicable to Windows Server 2012 and newer versions, Data deduplication techniques ensure that only one unique instance of data is retained on storage media, such as disk, flash or tape.

Cheers

7 0
3 years ago
What software can be used for remote operation of a sunsdr2 dx?.
Rasek [7]

Answer:

Install the ExpertSDR2 Remote Client software on your PC. Download the client here. You can also access your device via any web browser

8 0
2 years ago
Other questions:
  • Which of the following is a goal of paraphrasing and summarizing?
    14·2 answers
  • Look up and list the number of a local taxi or car service in your community. Include the company name and telephone number.
    13·1 answer
  • You are attempting to gather information about a client's network, and are surveying a company site. Access is gained via secure
    8·1 answer
  • In general, font size for software-generated presentation slides should be no smaller than __________ points.
    8·1 answer
  • Create a program that asks the user to enter grade scores. Use a loop to request each score and add it to a total. Continue acce
    9·1 answer
  • Similarites between hardware and software
    9·1 answer
  • What factor(s) should be considered when determining whether a business is too far based on the query and the user location? Sel
    10·1 answer
  • What ribbon command on the home tab can you use to change a cell fill color
    5·2 answers
  • Which of the following is an example of two-factor authentication?
    10·2 answers
  • the application you attempted to authenticate to is not authorized to use cas. contact your cas administrator to learn how you m
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!