Java程序辅导

C C++ Java Python Processing编程在线培训 程序编写 软件开发 视频讲解

客服在线QQ:2653320439 微信:ittutor Email:itutor@qq.com
wx: cjtutor
QQ: 2653320439

To listen to the supporting audio for this step, click on the audio button.
If you would rather read the audio text, .

Step 2


/////////////// PROBLEM STATEMENT /////////////////////// Read 3 integers and print them in ascending order ////   1 3 2 -> 1 2 3                                  // //   3 1 2 -> 1 2 3                                  ////   8 5 2 -> 2 5 8                                  /////////////////////////////////////////////////////////  // >>>>>> Your Java Code Fragment starts here <<<<<<    Scanner keyboard = new Scanner(System.in);    int smallest = keyboard.nextInt();  int middle = keyboard.nextInt();  int largest = keyboard.nextInt();  int temp;  // >>>>>> Your Java Code Fragment ends here   <<<<<<}}}

QUESTION 3:

Why have we declared the variable temp in the solution to the problem?