coding with cong

  • 홈
  • 방명록
  • 태그
  • 카테고리

dowhile 2

[JAVA] 메뉴를 선택하는 구문

//do~while과 switch이용 Scanner scan = new Scanner(System.in); int cho;//char로 받아도 괸계x do { System.out.println("--------menu---------"); System.out.println(" 1.저장 | 2.출력 | 3.종료"); System.out.println("---------------------"); System.out.println("메뉴를 선택해주세요.: "); cho = scan.nextInt( ); switch(cho) { case 1 : System.out.println("저장되었습니다."); break; case 2 : System.out.println("출력되었습니다." ); break; case ..

JAVA/java 코드 2023.03.26

[JAVA] up.down게임 (랜덤 숫자 맞추기)

1. while문 // 1~50사이의 랜덤 수 하나를 생성 후 그 수를 맞추는 게임. // 예) 컴퓨터가 랜덤 수를 생성했습니다.(범위 1~50) 45 // 사용자 입력: 20 // up! // 사용자 입력 : 50 // down! // 사용자 입력 : 45 // 정답! while (i != random) { System.out.println("랜덤 수를 맞춰보세요.(1~50): "); i = scan.nextInt(); count ++; if (i>50 || i random){ //System.out.println("down!"); //} else if (i == random) { //System.out.println("정답입니다! 랜덤 수는 " + random + "입니다."); else if (i ..

JAVA/java 코드 2023.03.26
이전
1
다음
더보기
프로필사진

coding with cong

콩의 작은 개발 블로그

  • 분류 전체보기 (441)
    • JAVA (70)
      • java (41)
      • java 코드 (29)
    • DB (63)
      • MySQL Workbench (12)
      • 명령프롬프트 - mysql (51)
    • HTML.CSS.JS (169)
      • html (24)
      • css (18)
      • JS (127)
    • JSP (52)
      • JSP (52)
    • Spring (40)
      • Spring-eclipse (20)
      • Spring (2)
      • Springboot-Intellij (18)
    • GIT (6)
      • GIT (4)
      • GIT ERROR (2)
    • Node.js (3)
    • 코딩테스트 (32)
    • 컴활 1급 실기 (3)

Tag

Update, create, select, mysql, if, indexOf, substring, random, is not null, modify, Trigger, erd, join, while, concat, Class, Table, for, Integer.parseInt, intstream,

최근글과 인기글

  • 최근글
  • 인기글

최근댓글

공지사항

페이스북 트위터 플러그인

  • Facebook
  • Twitter

Archives

Calendar

«   2025/05   »
일 월 화 수 목 금 토
1 2 3
4 5 6 7 8 9 10
11 12 13 14 15 16 17
18 19 20 21 22 23 24
25 26 27 28 29 30 31

방문자수Total

  • Today :
  • Yesterday :
콩의 깃허브!

꾸준한 개발자가 되고 싶은 콩의 블로그입니다.

공재불사! 열심히 노력해봐요!

티스토리툴바