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
Nadeen runs a website on vegan lifestyle. She wants to spread the word and make more people visit her site to read her recipes a
pashok25 [27]

What Nadeen needs to do to get people to engage with her web site is to regularly post new content and regularly respond to user comments and questions (options A and C).

<h3>What should Nadeen do to increase visits to her website?</h3>

Currently, social networks and pages have become tools to share information and create a community of people around a topic.

From this trend, many people have developed their own web pages to share their knowledge and experience with other people so that knowledge becomes public and help those who do not have as much knowledge.

However, for a page to have high interactions and visits from the public, the owner of the page must ensure that they comply with some recommendations that will increase the traffic of their page, such as:

  • Post frequently: This is because people are constantly looking for information and like to be up to date with the latest.
  • Respond to user comments and questions: This creates a link between the page owner and their visitors that makes them feel comfortable with this page. This also helps the owner create a community where everyone participates by contributing knowledge.

Note: This question is incomplete because the options are missing. Here are the options:

A. She must post new content on her website regularly.

B. She must increase the number of pay-per-click advertisements on her website.

C. She must regularly respond to user comments and questions.

D. She must use a secure payment gateway.

Learn more about vegan in: brainly.com/question/8708517

3 0
2 years ago
What is the difference between spyware and adware?
Sati [7]

Answer:

It's C

Explanation:

Adware displays or directs the users to an advertisement, while spyware performs espionage on the computer`s activity.

8 0
2 years ago
Read 2 more answers
The readline method reads text until an end of line symbol is encountered, how is an end of line character represented
zhannawk [14.2K]

Answer:

\n

Explanation:

readline() method is used to read one line from a file. It returns that line from the file.    

This line from the file is returned as a string. This string contains a \n at the end which is called a new line character.

So the readline method reads text until an end of line symbol is encountered, and this end of line character is represented by \n.

For example if the file "abc.txt" contains the lines:

Welcome to abc file.

This file is for demonstrating how read line works.

Consider the following code:

f = open("abc.txt", "r")  #opens the file in read mode

print(f.readline()) # read one line from file and displays it

The output is:

Welcome to abc file.    

The readline() method reads one line and the print method displays that line.                        

3 0
3 years ago
For all of you who listen to podcasts, when do you usually find time to do so?​
ss7ja [257]
Morning and afternoon commute times are obvious blocks of time that you can assume are used for listening to podcasts, but the answer will obviously vary widely based on individual habits and schedules.

Hope this helps
7 0
2 years ago
A chief Information Security Officer (CISO) is performing a BIA for the organization in case of a natural disaster. Which of the
nataly862011 [7]

Answer:

The correct answer is option (D) Identify the impact on safety of the property

Explanation:

Solution

In every Business Impact Analysis, the first and the most important step is for the CISO is to identify and estimate the impact of the aftereffects on the business and property of an organization that may be occurred from the disaster.

Physical security is very important, but it is not noticed by most organizations. It is important if you do not want anyone to take  away your information or destroy it, in case of natural calamity. the reason could be that, the intruder is  doing it for his personal achievement, financial gain,or seeking revenge or when one is taken unaware and becomes a target. If this security is not maintained properly all the safety measures will not be useful once the attacker gets through by gaining physical access.

Example of property can be software, equipment, facilities, company’s assets.

4 0
3 years ago
Other questions:
  • Which writing format is also beneficial to public speaking? a. Five paragraph essay c. Conventions b. Prose d. None of these
    5·2 answers
  • Which protocol is often used to publish web pages to a web server?
    5·1 answer
  • What type of organism forms the base of food webs?
    9·1 answer
  • In the software development life cycle, what is the role of participants in the planning phase? The participants’ role in the pl
    6·1 answer
  • Which scenario depicts an ethical workplace practice by a business owner
    15·2 answers
  • How does emotional awareness help you with non-verbal communication?
    13·2 answers
  • Assume that the int variables i and j have been declared, and that n has been declared and initialized.
    10·1 answer
  • 3. When you right-click a linked spreadsheet object, what commands do you choose to activate the Excel features?
    7·2 answers
  • Program a substitution cipher in Python. Create 2 functions one for encryption and the other for decryption ( get the text as th
    8·1 answer
  • Use a while loop to output the even number from 100 to 147? This is python
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!