본문 바로가기

분류 전체보기35

[SQL] hr schema hr schema -- 문제1) EMPLOYEES 테이블에서 급여가 3000이상인 사원의 사원번호, 이름, 담당업무, 급여를 출력하라. SELECT employee_id, first_name, salary FROM employees WHERE salary >= 3000; -- 문제2) EMPLOYEES 테이블에서 담당 업무가 ST_MAN인 사원의 사원번호, 성명, 담당업무, 급여, 부서번호를 출력하라. SELECT employee_id, first_name, job_id, salary, department_id FROM employees WHERE job_id LIKE 'ST_MAN'; -- 문제3) EMPLOYEES 테이블에서 입사일자가 2006년 1월 1일 이후에 입사한 사원의 사원번호, 성명, 담당.. 2021. 5. 26.
[Java] 계산기(Calculator) import java.util.*; public class Calculator { public static void main(String[] args) { Scanner scr = new Scanner(System.in); String str1, str2; String oper; // 첫번째 수 while(true) { System.out.print("첫번째 수: "); str1 = scr.nextLine(); if(str1.equals("") == true) { System.out.println("숫자를 정확하게 입력해 주세요"); continue; } // 문자가 포함인가? -> 다시 입력 boolean check = true; for (int i = 0; i < str1.length(); i++) .. 2021. 5. 15.
[Java] Baseball Game 야구게임 (10번의 기회) import java.util.*; public class Baseball { public static void main(String[] args) { Scanner sc = new Scanner(System.in); // 선언부 (변수) int com[] = new int[3]; int user[] = new int[3]; boolean clear; // 초기화 clear = false; // Random 할당 while(true) { com[0] = (int)(Math.random() * 9) +1; com[1] = (int)(Math.random() * 9) +1; com[2] = (int)(Math.random() * 9) +1; if(com[0] != com[1] && com[0] != com[.. 2021. 5. 10.
[Java] Random Game Up&Down 숫자 맞추기. (1~100까지, 10회) import java.util.Scanner; public class RandomGame { public static void main(String[] args) { Scanner sc = new Scanner(System.in); //선언부(변수) int randNum, userNum; boolean clear; //초기화 clear = false; //Random randNum = (int)(Math.random()*100)+1; int w = 0; while(w randNum) { msg = 0; }else if(userNu.. 2021. 5. 10.
[Java] Lotto, 숫자 중복 없이 5000원어치 public class Lotto { public static void main(String[] args) { boolean swit[] = new boolean[45]; int lotto[] = new int[30]; int w, r; w = 0; while(w < 30) { r = (int)(Math.random()*45); if(swit[r] == false) { swit[r] = true; lotto[w] = r + 1; w++; } } for(int i=0; i 2021. 5. 10.