Ask Question
19 January, 11:57

Write a Raptor program that will get two values from user, then display values in descending order; if the same values are received from the user, display "The same number was received."

+4
Answers (1)
  1. 19 January, 15:38
    0
    The program written in Java programming language is given in the explanation section

    Explanation:

    import java. util. Scanner;

    public class num10 {

    public static void main (String[] args) {

    Scanner in = new Scanner (System. in);

    System. out. println ("Enter First number");

    int fnum = in. nextInt ();

    System. out. println ("Enter Second Number");

    int snum = in. nextInt ();

    if (fnum>snum) {

    System. out. println (fnum+", "+snum);

    }

    else if (snum>fnum) {

    System. out. println (snum+", "+fnum);

    }

    else{

    System. out. println ("The same number was received.");

    }

    }

    }
Know the Answer?
Not Sure About the Answer?
Get an answer to your question ✅ “Write a Raptor program that will get two values from user, then display values in descending order; if the same values are received from ...” in 📙 Computers & Technology if there is no answer or all answers are wrong, use a search bar and try to find the answer among similar questions.
Search for Other Answers