전체 글75 ex06_3.java public class ex06_3 { public static void main(String[] args) { int[] responses = {1, 2, 6, 4, 8, 5, 9, 7, 8, 10, 1, 6, 3, 8, 6, 10, 3, 8, 2, 7, 6, 5, 7, 6, 8, 7, 5, 6, 6, 5, 6, 7, 5, 6, 4, 8, 6, 8, 10, 6}; int[] a = new int[11]; System.out.println("Rating Frequency"); for(int i=0; i 2023. 5. 6. ex06_2.java public class a { public static void main(String[] args) { int p = 1000; double r = 0.05; double a; for(int n=0; n 2023. 5. 6. ex06_1.java public class ex06_1 { public static void main(String[] args) { int[] x = {87, 68, 94, 100, 83, 78, 85, 91, 76, 87, 55, 60, 99, 63, 80}; int sum = 0, max = x[0], min = x[0]; double m = 0, s = 0, v; for(int i=0; i max) { max = x[i]; } if(x[i] < min) { min = x[i]; } } m = (double)sum / x.length; sum = 0; for(int i=0; i 2023. 5. 6. 병렬 패리티 비트 public class ex07_1 { public static void main(String[] args) { int[][] bit = {{1, 0, 1, 0, 1, 1, 1, 1}, {1, 0, 0, 0, 0, 0, 1, 1}, {0, 1, 0, 0, 0, 0, 0, 0}, {1, 1, 1, 1, 0, 0, 0, 0}, {1, 0, 1, 1, 1, 0, 0, 1}, {0, 0, 0, 0, 0, 1, 1, 1}, {1, 1, 1, 1, 1, 1, 1, 1}, {0, 1, 1, 1, 1, 0, 0, 0}}; for(int width=0; width 2023. 4. 26. 이전 1 ··· 15 16 17 18 19 다음