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
What do we call notes in computer code for the programmer that are ignored by the compiler?.
Lelu [443]

The notes in computer code for the programmer that are ignored by the compiler is called a comment.

<h3>What are codes in programming?</h3>

Codes in programming are specific sequences or sets of instructions that are made for specific programs. They are written in a specific language. They are made to make a human-friendly language. Codes are made after the compiler confirms them.

Comments are written for the document. They tell what the document is for, and how the document is constructed.

Thus, the notes on the computer code for the programmer are called a comment.

To learn more about comments in computer code, refer to the link:

brainly.com/question/18340665

#SPJ4

4 0
2 years ago
Using the drop-down menu, complete these sentences to describe algorithms. Algorithms are instructions to solve a problem. Algor
vfiekz [6]

Answer:

Algorithms are instructions to solve a problem

Explanation:

6 0
3 years ago
Read 2 more answers
With a patent on drug Z27, why would Able Drug Company charge customers $7 per 100 units even though its cost of producing 100 u
garik1379 [7]
The Able Drug Company does that to make a beneficial profit, because if they sold it for what it was worth then they would not make any money.
4 0
3 years ago
Read 2 more answers
At a local burger chain, a customer became extremely angry. Everyone took notice at the person, who was yelling at anyone he cou
leonid [27]

Answer: Donald, the branch manager displayed people skills  

Explanation: People skills are a combination of behavior and behavioral interactions between people. There are many abilities that fall under the category of people skills, for example, personal effectiveness, interactive skills and negotiation skills. While the customer was shouting, Donald patiently heard and tried to calm the customer which reflected that he respected and valued the customer and kept a positive behavior towards the customer.


5 0
3 years ago
Read 2 more answers
Which of the following is NOT an advantage to using inheritance?
IrinaK [193]

Answer:

D)One big superclass can be used instead of many little classes.

Explanation:

Inheritance could be described as getting new class on another existing class with almost same execution,

inheritance allows codes to be re-used. It should be noted that inheritance bring about the code sharing among class.

The advantages of using inheritance includes but not limited to

✓ Code that is shared between classes needs to be written only once.

✓Similar classes can be made to behave consistently.

✓ Enhancements to a base class will automatically be applied to derived classes.

6 0
4 years ago
Other questions:
  • Binary is a sequence of 0s and 1s such as 1001101 which can be used to code information. To break a code, you need to find how m
    14·1 answer
  • Write a program that reads a list of scores and then assigns grades python
    9·1 answer
  • Your program will demonstrate use of arrays, searching an array, using methods, passing parameters by reference, returning value
    13·1 answer
  • Which two fields in an Ethernet frame help synchronize device communica- tions but are not counted toward the frame’s size?
    11·1 answer
  • Describe how one can change row and height
    6·1 answer
  • Write a program in C++ or C that includes two different enumeration types and has a significant number of operations using the e
    15·1 answer
  • Which among the following choices is correct based on the two statements listed below? Statement 1: When the lexical analyzer sc
    12·1 answer
  • If there is only a stop sign posted at a railroad
    9·1 answer
  • In java
    6·1 answer
  • he degree of operating leverage is equal to: Group of answer choices FC / OCF. VC / OCF. 1 FC / OCF. 1 VC / OCF. 1 Picture FC /
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!