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
Can someone that been helping me answer one more question for please and thx
Gnom [1K]

Answer:

D

Explanation:

Federal Tax, not state

5 0
3 years ago
Convert the following hexadecimal numbers to decimal: (a) FF (b) F0A2 (c) 0F100 (d) 100
Hatshy [7]

Answer:

a) 255

b) 61602

c)

d)

Explanation:

You need to understand the decimal equivalent of hexadecimal numbers, <em>from 0 to 9 numbers are represented the same way, from 10 to 15 we use the alphabet, meaning 10 equals A in hexadecimal base, 11-B, 12-C, 13-D, 14-E, and 15-F.</em>

For your first exercise you'll enumerate the number's positions fromright to lef begining with 0:

a.               F   F

position    1    0

Now you'll multiply your hexadecimal number (using the decimal equivalent for your letters) for the base (16) elevated to the number of the position:

F*16^{0}=15*1=15\\F*16^{1}=15*16=240

Finally, you'll add your results:

240+15=255

FF=255

b.             F  0  A  2

position   3  2  1   0

2*16^{0}=2*1=2\\A*16^{1}=10*16=160\\0*16^{2}=0*256=0\\F*16^{3}=16*4096=61440\\\\2+160+0+61440=61602\\

F0A2=61602

c.             F  1  0  0

position   3  2  1   0

0*16^{0}=0*1=0\\0*16^{1}=0*16=0\\1*16^{2}=1*256=256\\F*16^{3}=16*4096=61440\\0+0+256+61440=61696\\

0F100=61696

d.              1  0  0

position  2  1   0

0*16^{0}=0*1=0\\0*16^{1}=0*16=0\\1*16^{2}=1*256=256\\\\0+0+256=256\\

100=256

I hope you find this information useful! Good luck!

8 0
3 years ago
.Although SQL is a language, you don’t use it to write applications? (true, false)
Olin [163]

Answer:

The correct answer for the given question is true .

Explanation:

SQL is an Structural query language that is used for accessing the database basically it is an query language which is used for communicating with database by executed the query .

The following are the function of SQL  

SQL can insert the data into database

it can update the record into database

SQL can retrived the database.

We do not use SQL for writing application it is only used to accessing the database  

For create application we can use programming language Like PHP,ASP,JAVA ,PYTHON.etc.

3 0
3 years ago
What is the car on the right?
oksano4ka [1.4K]

looks like a rxc custom gt3 with a v6 *badass sport car*

3 0
3 years ago
Please Help!!!<br> I keep getting this answer wrong
IgorC [24]

Answer:

I think its option a. and d.

Explanation:

option a. is right I'm sure.

option b. and c. are doubtful for me.

option d. can be true. but unlike a job letter, resumes carry a deeper view of the employee's accomplishments and qualifications.

but I still hold with option a. and b. if it's wrong please do inform, so I can refer.

5 0
3 years ago
Other questions:
  • Which flooring option is most economical
    11·1 answer
  • What is hydraulic fracturing?
    7·1 answer
  • A sequence of one or more characters is called
    14·1 answer
  • How should font appear in a slide presentation compared to the font in a document
    7·1 answer
  • Once secured a wheelchair may move up to 6 inches in any direction
    6·1 answer
  • Jenis jenis perangkat keras?
    14·1 answer
  • Write the algorithm for finding the perimeter of a rectangle using English like form step by step
    10·1 answer
  • Choose the tag required for each stated goal.
    12·1 answer
  • When hacking a website to test a secure connection and ensure internet safety, what is a good way to check the coding of the web
    14·1 answer
  • What is the name of the function below?<br><br> function go(){<br> alert("hello everybody");<br> }
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!