Ask Question
18 March, 14:24

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

+3
Answers (1)
  1. 18 March, 14:32
    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 & Technology if the answers seem to be not correct or there’s no answer. Try a smart search to find answers to similar questions.
Search for Other Answers