Ask Question
10 June, 09:29

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."

+1
Answers (1)
  1. 10 June, 13:02
    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?
Find 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 and Technology if you're in doubt about the correctness of the answers or there's no answer, then try to use the smart search and find answers to the similar questions.
Search for Other Answers