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
5. What is a domain name used for?​
Mnenie [13.5K]

<u>Answer:</u>

Domain names serve to identify Internet resources, such as computers, networks, and services, with a text-based label that is easier to memorize than the numerical addresses used in the Internet protocols. A domain name may represent entire collections of such resources or individual instances.

<u />

<u>Explanation:</u>

*Hope this helps*

7 0
3 years ago
Which of these is NOT a benefit of being connected 24/7?
Serjik [45]

Answer:

c

Explanation:

answering messages is a more of a choice than a benifit.

3 0
3 years ago
QUICK! The commands available from a menu change depending upon what you are doing. True False
Arisa [49]

Answer:

true because it changes depending upon what you were doing so true

7 0
3 years ago
Read 2 more answers
The minimum recommended standards for the operating system, processor, primary memory (RAM), and storage capacity for certain so
timurjin [86]

Answer:

They are called System Requirements.

Explanation:

3 0
2 years ago
General purpose computer can perform a single task, true or false​
den301095 [7]

Answer:

This is false.

Explanation:

General-purpose computers are desktop computers or laptops that can function in multiple ways. A s<u>pecial-purpose computer</u> is usually designed to do one thing only.

8 0
3 years ago
Other questions:
  • A database has a built-in capability to create, process and administer itself.
    14·1 answer
  • Why did Hunter gatherers moved into the<br>America's?​
    8·1 answer
  • Which elements are visible when a user opens a new PowerPoint presentation?
    7·2 answers
  • how many usable host addresses are available for each subnet when 4 bits are borrowed from a class C IP address
    11·1 answer
  • In Python, parentheses are used in calculations where the order of operations affects the outcome. (5 points)
    9·1 answer
  • how does a demilitarized zone (dmz) work. A.By preventing a private network from sending malicious traffic to external networks
    10·1 answer
  • One limitation of high-level programming languages is
    10·1 answer
  • FoRWarD MaRcH AND hERe We Go MEMbers of the agEncy BaKuGO AHHHHHHHHH-
    10·2 answers
  • Chapter 20 reading and vocab review
    15·1 answer
  • Wirte a program which asks the users to input length and calculates the area of a square.( Area = Length^2)​
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!