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]
3 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]3 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
Is it legal to build cellphone tower
Marat540 [252]
If you build a cellphone tower without proper building permits and equipment without permission from local government than it would be illegal
3 0
4 years ago
Which material, distributed to audience members, contains additional information about topics covered in the presentation?
Vladimir79 [104]
Outlines because you would not want the audience to know what exactly is on the slides, but just an outline to give them an idea of what is to come.
8 0
3 years ago
Read 2 more answers
Which slide elements must claire use to enhance her presentation?
Crank

The answer for the 1st blank is text.


6 0
3 years ago
Read 2 more answers
Suppose we have two threads inserting keys using insert() at the same time. 1. (5 points) Describe the exact sequence of events
Leona [35]

Answer:

Say you have a key in a dictionary, or a key in a 2-d list. When you insert(), you are destructively iterating the original list and modifying it to reflect the insert() component. In order for the key to get lost you would have to do say insert(len: :1) which would remove the second key and therefore cause it to get "lost" because it will be destructivsly removed from its assignment and replaced by whatever you choose to insert.

Rate positively and give brainlist

8 0
3 years ago
Is my document folder located at taskbar​
KiRa [710]
Nope its located at your my computer
8 0
3 years ago
Other questions:
  • Exchanging which type of data uses the least bandwidth?
    14·1 answer
  • The class shown below called is called CSVReader. Use this class exactly as it is written (specifically don’t add any instance v
    8·1 answer
  • Which variable name is the best to hold the area of a rectangle?<br> 1A<br> area<br> AREA<br> a
    13·1 answer
  • User-system interaction is?
    11·1 answer
  • What is the current when the voltage is 18 volts and the resistance is 6 ohms?
    7·1 answer
  • Have you ever had an incorrect perception about someone else?
    6·1 answer
  • Which workplace trend are outsourcing and telecommuting are examples of? Please select the best answer from the choices provided
    13·2 answers
  • The World Wide Web is a program that allows you to search for information on the Internet.
    9·1 answer
  • You are a cleared employee. Your friend called and told you that he saw information about the classified XYZ program on the Inte
    10·1 answer
  • Marcus traded in his 10-year-old truck for a new one. Because it is the first new truck he
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!