본문 바로가기

분류 전체보기384

0927_bootstrap 사용방법(CDN) Bootstrap에서 제공하는 quick start 참고하여 html 내에 추가 https://getbootstrap.com/docs/5.2/getting-started/introduction/ Get started with Bootstrap Bootstrap is a powerful, feature-packed frontend toolkit. Build anything—from prototype to production—in minutes. getbootstrap.com 참고 :https://bcp0109.tistory.com/348 오류메세지 정리 Simple List /*추가 내용, 버튼 코드: Button */추가 내용, 버튼 코드: /*리스트 table 코드: # Description Done .. 2022. 9. 27.
0927_이중배열(빙고게임) import java.util.Scanner; public class TestNine { public static void main(String[] args) { //---------------------------------0927 // 25개 짜리 이차원배열 생성 // 빙고게임 만들기 int[][] bingo = new int[5][5]; // 1-50사이의 난수로 초기화 for (int i = 0; i < bingo.length; i++) { for (int j = 0; j < bingo[i].length; j++) { bingo[i][j] = (int) (Math.random() * 50) + 1; } } for (int i = 0; i < bingo.length; i++) { for (int j.. 2022. 9. 27.
0926_이중배열 //------------------------------------------------0926 2차원 배열 //int[][] score = {{1,2,3},{4,5,6},{7,8,9}}; // //for(int i =0;i 2022. 9. 26.
0922_배열 public class ArrayTest { //0922:array public static void main(String[] args) { //배열 : 동일한 타입의 변수를 여러개 정의 하는 것 /*int[] arr; //배열의 선언 arr = new int[5]; //배열의 생성. 5개를 담을 거라는 뜻 arr[0] = 10; //인덱스를 활용한 값 할당 arr[1] = 20; arr[2] = 30; arr[3] = 40; arr[4] = 50; System.out.println(arr[0]); System.out.println(arr[1]); System.out.println(arr[2]); System.out.println(arr[3]); System.out.println(arr[4]); */ /.. 2022. 9. 22.
0922_반복문의 제어 //반복문의 제어 : continue -----------------------------------------0922 //for(int i=1;i 1+2+3+4+5 -> 15 //몇번 반복해야할지 모르니까 while문 추천 //Scanner sc = new Scanner(System.in); //int num = sc.nextInt(); //int sum = 0; // //while(num > 0) { //sum += num % 10; //num = num / 10; //} //System.out.println(sum); //%, /를 반복 //12345 % 10 => 5 //12345/ 10 => 1234 //1234%10 -> 4 //1234%10 -> 123 //num>0 될때까지 //앞부터 추출.. 2022. 9. 22.
0921_반복문 public class LoopTest { // 0921 반복문 public static void main(String[] args) { // 반복문 : 실행문을 여러번 동작하게 한다. // for, while, do-while(보통 잘 안씀) //for(초기문; 조건식; 증감식) { //실행문 //} //for(int i=0; i 2022. 9. 22.