Computer Science, asked by sunitazirange, 10 months ago

Write a java program to arrange 3 numbers (input by user)in descending order.
plzzzz its urgent!!!!!!!!!!

Answers

Answered by Srusti18
1

Answer:

class spdf

{

public void app(int a, int b, int c)

{

if(a<b & & a<c)

System.out.println (

Answered by Anonymous
2

Explanation:

import java.util.Scanner;

public class Desc

{

public static void main(String[] args)

{

int a,b,c;

Scanner sc=new Scanner(System.in);

System.out.print("Enter the 3 numbers");

a=sc.nextInt();

b=sc.nextInt();

c=sc.nextInt();

int max=(a>b && a>c)?a:(b>c?b:c);

int min=(a<b && a<c)?a:(b<c?b:c);

System.out.println("descending order is "+max+","+(a+b+c-max-min)+","+min);

}

}

Attachments:
Similar questions