프로그래밍 (122) 썸네일형 리스트형 [자바] 정올 170 ~ 174 : 함수1 - 형성평가1 ~ 5 형성평가1 public class Main { public static void main(String[] args) { System.out.println("first"); pr(); System.out.println("second"); pr(); System.out.println("third"); pr(); } public static void pr(){ System.out.println("@@@@@@@@@@"); } } 형성평가2 import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int a =sc.nextInt(); int answe.. [자바] 정올 571 ~ 578 : 함수1 - 자가진단1 ~ 8 자가진단1 import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); pr(n); } public static void pr(int n){ System.out.println("~!@#$^&*()_+|\n".repeat(n)); } } 자가진단2 import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); wo.. [자바] 정올 160 ~ 169 : 배열2 - 형성평가1 ~ 10 형성평가1 import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int val; int[] count = new int[7]; for(int i = 0; i < 10; i++){ val = sc.nextInt(); count[val] += 1; } for(int i = 1; i < 7; i++) System.out.println(i + " : " + count[i]); } } 형성평가2 import java.util.Scanner; public class Main { public static void main(String[] args) {.. [자바] 정올 564 ~ 570 : 배열2 - 자가진단1 ~ 7 자가진단1 import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); char[] arr = new char[100]; int[] arr2 = new int[26]; char ch; int i; for(i = 0; i 90) break; arr[i] = ch; arr2[(int)ch - 65]++; } for(int j = 0; j < arr2.length; j++){ if(ar.. [자바] 정올 150 ~ 159 : 배열1 - 형성평가 1 ~ 10 형성평가1 import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); char[] arr = new char[10]; for(int i =0; i =0; i--) System.out.print(arr[i] + " "); } } 형성평가2 import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new S.. [자바] 정올 555 ~ 563 : 배열1 - 자가진단 1 ~ 9 자가진단1- 555 import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); char[] arr = new char[10]; for(int i = 0; i < 10;i++){ arr[i] = sc.next().charAt(0); } for(int i = 0; i < 10;i++){ System.out.print(arr[i]); } } } 자가진단2 - 556 public class Main { public static void main(String[] args) { int[] arr = {1,2,3,4,5,6,7,8,9,10}; for(int.. [자바] 정올 140 ~ 149 : 반복제어문3 - 형성평가1 ~ 10 형성평가1 import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n,a, sum = 0; for(n = 0; n < 20; n++){ a = sc.nextInt(); if(a == 0) break; sum += a; } System.out.printf("%d %d", sum, sum/n); } } 형성평가2 import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int.. [자바] 정올 549 ~ 553 && 634 : 반복제어문3 - 자가진단 1 ~ 7 자가진단1 import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int sum = 0, count = 0, n = sc.nextInt(); for(int i = 1; i = n) break; if(i%2 != 0) { count++; sum += i; } }//end for System.out.println(count + " " + sum); } } 자가진단2 import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = n.. 이전 1 2 3 4 5 6 7 8 ··· 16 다음