import java.util.Scanner;

 public class Solution
 {
     public static void main(String[] args)
     {
         Scanner input = new Scanner(System.in);
         System.out.print("Enter three numbers: ");
         double n1 = input.nextDouble();
         double n2 = input.nextDouble();
         double n3 = input.nextDouble();

         input.close();

         displaySortedNumbers(n1, n2, n3);
     }

     public static void displaySortedNumbers(double num1, double num2, double num3)
     {
         if(num1 > num2 && num1 > num3)
         {
             if(num2 > num3)
                 System.out.println(num3 + " " + num2 + " " + num1);
             else
                 System.out.println(num2 + " " + num3 + " " + num1);
         }
         else if(num2 > num1 && num2 > num3)
         {
             if(num1 > num3)
                 System.out.println(num3 + " " + num1 + " " + num2);
             else
                 System.out.println(num1 + " " + num3 + " " + num2);
         }
         else if(num3 > num1 && num3 > num2)
         {
             if(num1 > num2)
                 System.out.println(num2 + " " + num1 + " " + num3);
             else
                 System.out.println(num1 + " " + num2 + " " + num3);
         }
     }
 }

HW5.5的更多相关文章

  1. HW5.36

    import java.util.Scanner; public class Solution { public static void main(String[] args) { Scanner i ...

  2. HW5.35

    import java.util.Scanner; public class Solution { public static void main(String[] args) { Scanner i ...

  3. HW5.34

    import java.util.Scanner; public class Solution { public static void main(String[] args) { Scanner i ...

  4. HW5.33

    import java.util.Calendar; public class Solution { public static void main(String[] args) { long tot ...

  5. HW5.32

    public class Solution { public static void main(String[] args) { int n1 = (int)(Math.random() * 5 + ...

  6. HW5.31

    import java.util.Scanner; public class Solution { public static void main(String[] args) { Scanner i ...

  7. HW5.30

    public class Solution { public static void main(String[] args) { for(int i = 3; i <= 1000; i++) i ...

  8. HW5.29

    public class Solution { public static void main(String[] args) { int n1 = (int)(Math.random() * 5 + ...

  9. HW5.28

    public class Solution { public static void main(String[] args) { System.out.printf("%s\t%s\n&qu ...

  10. HW5.27

    public class Solution { public static void main(String[] args) { int totalCount = 0; int lineCount = ...

随机推荐

  1. Java EJX

    EJX http://www.docin.com/p-121548732.html

  2. MVC-ActionResult解说

    HttpNotFoundResult: 专门用来响应Http404找不到网页的错误,在System.Web.Mvc.Controller类别中内建了一个HttpNotFound()方法,可以很方便的回 ...

  3. online web design tool

    https://webflow.com/ http://css-tricks.com/snippets/ https://www.fluidui.com/demos

  4. stdafx.h的作用以及原理

    stdafx.h VC工程里面经常见到stdafx.h这个头文件,以前也没有特别注意,但是这个文件用不好经常会出错,所以就GOOGLE了一下,总算是弄清楚了... stdafx的英文全称为:Stand ...

  5. BZOJ 3713: [PA2014]Iloczyn

    Description 斐波那契数列的定义为:k=0或1时,F[k]=k:k>1时,F[k]=F[k-1]+F[k-2].数列的开头几项为0,1,1,2,3,5,8,13,21,34,55,-你 ...

  6. Ubuntu 14.04远程登录服务器--ssh的安装和配置

    ssh是一种安全协议,主要用于给远程登录会话数据进行加密,保证数据传输的安全,现在介绍一下如何在Ubuntu 14.04上安装和配置ssh 1.更新源列表 打开"终端窗口",输入& ...

  7. table 表头固定

    <html> <head> <title>Test</title> <style type="text/css"> .d ...

  8. gif录制工具

    gif录制工具 This tool allows you to record a selected area of your screen and save it as a Gif. http://s ...

  9. module_init宏解析

    在init.h中我们看到 #define module_init(x) __initcall(x); 还看到 #define __initcall(fn) device_initcall(fn) 还有 ...

  10. Form表单中的三种查询方法

    1.使用:parameter.G_query_find参数: IF (NAME_IN('PO_HEADERS.PO_HEADER_ID') IS NOT NULL) THEN    :paramete ...