Computer Science, asked by aditisingh12468, 10 months ago

Write a java program to enter 3 numbers and print then in descending order.



Answers

Answered by brijeshhkumar1980
3

Explanation:

Explanation:

import java.util.Scanner;

public class D

{

public static void main(String args[])

{

int a,b,c;

Scanner sc=new Scanner(System.in);

System.out.println("Enter 3 integers");

a=sc.nextInt ();

b=sc.nextInt();

c=sc.nextInt ();

if (a>b&&b>c&&a>c)

{

System.out.println("Numbers in descending order= "+a+" > "+b+" > "+c);

}

if(b>a&&a>c&&b>c)

{

System.out.println("Numbers in descending order= "+b+" > "+a+" > "+c);

}

if(c>a&&c>b&&b>a)

{

System.out.println("Numbers in descending order= "+c+" > "+b+" > "+a);

}

plz mark brainliest. . . . follow for every answer instantly

Similar questions