0% found this document useful (0 votes)
4 views2 pages

Java Sorting Program Fill-in-the-Blank

The document is a Java sorting program that prompts the user to enter three numbers and determines their maximum, median, and minimum values. It includes placeholders for variable assignments and comparisons to sort the numbers correctly. The program outputs the sorted values after processing the input.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views2 pages

Java Sorting Program Fill-in-the-Blank

The document is a Java sorting program that prompts the user to enter three numbers and determines their maximum, median, and minimum values. It includes placeholders for variable assignments and comparisons to sort the numbers correctly. The program outputs the sorted values after processing the input.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

Q1. Fill in the blank following java sorting program.

import [Link];

class Sorting{

public Static void main(String []args){

Scanner scan=new Scanner([Link]);

int max,med,min,a,b,c;

med=max=min= ;

[Link]("Enter three Number: ");

a=[Link]();

b=[Link]();

c=[Link]();

if( a > b )

{ if( a > c )
{

= a;

if( b > c )

= ; = c;

else{

= c; = b;

}}

else

= a; = b; =c;
}

else

{ if( b > c )

{ max = ;

if( a > c )

= ; = c;

else{

med= ; = ;

}s

else{

med = ;max = ; min = ;

[Link] ("Max =”+max+”Med=”+med+”Min=”+min);

You might also like