import java.util.Scanner;

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

         for(int i = 0; i < 10; i++)
             numbers[i] = input.nextDouble();

         input.close();

         System.out.println("The minimum element in the array is " + min(numbers));
     }

     public static double min(double[] array)
     {
         double minValue = Double.MAX_VALUE;
         for(double i: array)
             if(i < minValue)
                 minValue = i;

         return minValue;
     }
 }

HW6.9的更多相关文章

  1. HW6.30

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

  2. HW6.29

    public class Solution { public static void main(String[] args) { int count = 0; int[] card = new int ...

  3. HW6.28

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

  4. HW6.27

    import java.util.Scanner; import java.util.Arrays; public class Solution { public static void main(S ...

  5. HW6.26

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

  6. HW6.25

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

  7. HW6.24

    public class Solution { public static void main(String[] args) { int count = 0; int color; int numbe ...

  8. HW6.23

    public class Solution { public static void main(String[] args) { boolean[] box = new boolean[101]; f ...

  9. HW6.22

    import java.util.Arrays; public class Solution { public static void main(String[] args) { int[][] ch ...

  10. HW6.21

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

随机推荐

  1. Visual C++ unicode and utf8 转换

    ATL宏: USES_CONVERSION; W2A A2W CString StringUtil::UTF8_to_UNICODE(const char *utf8_string, int leng ...

  2. C++中的构造函数,拷贝构造函数和赋值运算

    关于C++中的构造函数,拷贝构造函数和赋值运算,以前看过一篇<高质量C++/C编程指南>的文章中介绍的很清楚,网上能搜索到,如果想详细了解这方面的知识可以参看一下这篇文章. 常见的给对象赋 ...

  3. 1961-计算机基础知识大赛 2 (new)

    描述 求A^B的最后三位数表示的整数(1<=A,B<=10000) 输入 A B 输出 A^B的最后三位数 样例输入 2 3 12 6 样例输出 8 984 #include<ios ...

  4. Android Spinner(级联 天气预报)

    activity_spinner.xml <?xml version="1.0" encoding="utf-8"?> <LinearLayo ...

  5. 【转】PostgreSQL IP地址访问配置

    原文:http://blog.csdn.net/shuaiwang/article/details/1793294 1.PostgreSQL的安装目录,进入data文件夹,打开postgresql.c ...

  6. MySQL 5.6 安装配置

    mysql 5.6.17下载安装图解_百度经验 http://jingyan.baidu.com/article/4b07be3c67853c48b380f311.html windows 8 系统将 ...

  7. 区分jquery中的offset和position

    一次又一次地碰到需要获取元素位置的问题, 然后一次又一次地查offset和position的区别. 忍不了了, 这次一定得想办法记下来. position是元素相对于父元素的位置. 这个好记, par ...

  8. poj 3694 Network(双连通分量)

    题目:http://poj.org/problem?id=3694 #include <iostream> #include <cstring> #include <cs ...

  9. ORACLE【2】:锁机制及解锁

    1. 锁的基本知识 根据要保护的对象不同,oracle的数据锁可以分成以下几类:DML锁,(data locks)数据锁,用于保护数据的完整性:DDL锁(dictionary locks),用于保护数 ...

  10. UVa 11040 (水题) Add bricks in the wall

    题意: 45块石头如图排列,每块石头上的数等于下面支撑它的两数之和,求其余未表示的数. 分析: 首先来计算最下面一行的数,A71 = A81 + A82 = A91 + 2A92 + A93,变形得到 ...