public class Solution
 {
     public static void main(String[] args)
     {
         int[] count = new int[10];
         int number;
         for(int i = 0; i < 100; i++)
         {
             number = (int)(Math.random() * 10);
             count[number]++;
         }

         for(int i = 0; i < 10; i++)
             System.out.println(i + "\t" + count[i]);
     }
 }

HW6.7的更多相关文章

  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. 作为 .Net 攻城师,所必需掌握的 .Net Profiling 技术

    众所周知,性能问题是所有实用应用在迭代过程中必然要面对的问题.对于此类问题,简单地投入更多硬件资源的做法可能会取得一定效果.但总的来看,此类做法的边际成本是不断上升的.换言之,随着性能需求的上涨,要换 ...

  2. GIT:本地有更改,但强制作远程仓库里作更新

    有时,紧急线上修改时,这个功能有用处的. git fetch --all git reset --hard origin/master ================ git reset --har ...

  3. 命名空间“System.Web.Mvc”中不存在类型或命名空间名称“Ajax”(是否缺少程序集引用?)

    解放方法 右键打开这个项目引用System.Web.Mvc,如图: 将复制本地的值改为True,英文的话应该是Copy Local,这样就解决了上面的报错问题.

  4. 编程添加"作为服务登录”权利(包括例子和API)

    搜索"log on as a service programmatically" https://msdn.microsoft.com/en-us/library/windows/ ...

  5. D3DXCOLOR 和 D3DCOLOR 和 D3DCOLORVALUE

    D3DCOLOR 是一个DWORD 型.第一个byte表示Alpha值,后面三个byte依次是r(红)g(绿)b(蓝)值.32位. 下面是一些关于D3DCOLOR 的宏: D3DCOLOR_ARGB( ...

  6. Tableau

    http://tableau.analyticservice.net/desktop.html

  7. 获取html上元素的真正坐标

    使用HTML元素的style.left,style.top,style.width,style.height以及width,height属性,都不能获得元素的真正位置与大小,这些属性取出来的都是原来的 ...

  8. poj3281

    非常非常经典的构图 有二分图学习基础的话,很容易想到这是一个“三分图”的匹配问题 我们将牛,food,drink作为点 为了方便,我们将牛放在中间,每头牛的出边指向drink种类,入边由food指入 ...

  9. UVa 129 (回溯法) Krypton Factor

    回溯法确实不是很好理解掌握的,学习紫书的代码细细体会. #include <cstdio> ]; int n, L, cnt; int dfs(int cur) { if(cnt++ == ...

  10. I.MX6 Linux 自动获取AR1020 event input节点

    /*********************************************************************** * I.MX6 Linux 自动获取AR1020 ev ...