# 009public class Array陣列 { int[] array1=new int[]; ``` public static void main(String[] args) { // 1 - 6 => 各出現次數 int[] point = new int[6]; // 0 - 5 for (int i=0; i<100; i++){ point[(int)(Math.random()*6)]++; } for (int i=0; i<point.length; i++){ System.out.println( (i+1) + "點出現" + point[i] + "次"); } } } ```
×
Sign in
Email
Password
Forgot password
or
By clicking below, you agree to our
terms of service
.
Sign in via Facebook
Sign in via Twitter
Sign in via GitHub
Sign in via Dropbox
Sign in with Wallet
Wallet (
)
Connect another wallet
New to HackMD?
Sign up