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. codeforces 615D - Multipliers

    Multipliers 题意:给定一个2e5范围内的整数m,之后输入m个2e5内的素数(当然可以重复了),问把这些输入的素数全部乘起来所得的数的约数的乘积mod(1e9+7)等于多少? 思路:对题目样 ...

  2. easyui 汉化问题

    遇到 easyui  需要汉化的 , 1: 找到 汉化文件 ,文件位于 插件的 locale 文件夹 内 easyui-lang-zh_CN.js 2: 将其 加载 与 easyui 之后 <s ...

  3. Spring核心框架 - AOP的起源及介绍

    一.AOP技术起源 AOP技术的诞生并不算晚,早在1990年开始,来自Xerox Palo Alto Research Lab(即PARC)的研究人员就对面向对象思想的局限性进行了分析.他们研究出了一 ...

  4. cxlibw-5-0.dll was not found

    However every once in a while we are getting the following error message: "This application has ...

  5. Runtime - 01

    Runtime是想要做好iOS开发,或者说是真正的深刻的掌握OC这门语言所必需理解的东西.最近在学习Runtime,有自己的一些心得,整理如下, 什么是Runtime 我们写的代码在程序运行过程中都会 ...

  6. 黄聪:如何使用CodeSmith批量生成代码(转:http://www.cnblogs.com/huangcong/archive/2010/06/14/1758201.html)

    先看看CodeSmith的工作原理: 简单的说:CodeSmith首先会去数据库获取数据库的结构,如各个表的名称,表的字段,表间的关系等等,之后再根据用户自定义好的模板文件,用数据库结构中的关键字替代 ...

  7. 最近在折腾VPS(持续完善)

    买的某国内vps. 本机环境 Win7-x64 使用官方英文版的putty,用于远程登录linux主机.WinSCP图形界面管理文件. VPS CentOS 6.2 安装 安全狗(safedog.cn ...

  8. 在Unity中高效工作(下)

    原地址:http://www.unity蛮牛.com/thread-20005-1-1.html Tips for Creating Better Games and Working More Eff ...

  9. POJ 1151 Atlantis(离散化)

    点我看题目 题意 : 就是给你n个矩形的最左下角和最右上角的点的坐标,然后将这n个矩形的面积求出来. 思路 : 离散化求矩形面积并.离散化具体介绍.将横纵坐标离散开来分别存,然后排序,也可以按照黑书上 ...

  10. 页面上动态编译及执行java代码

    本文地址:http://www.cnblogs.com/liaoyu/p/real-time-compile-and-run-java-code-web-app.html 最近看到同事在页面上编译和执 ...