This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package array; | |
| public class Test_7 { | |
| public static void main(String[] args) { | |
| /* | |
| * 다음 데이터를 배열에 저장하고 주어진 문제에 맞게 위치 조작하여 출력 데이터 = 자바, 자바스크립트, 파이썬 루비, C# 1. 데이터의 | |
| * 순서를 거꾸로 바꾸어 출력(데이터 개수가 달라져도 처리) 2. 데이터의 순서를 무작위로 바꾸어 출력 - 모든 자리가 자기 자신을 제외한 | |
| * 다른 자리와 한번 이상 바뀌어야 한다. - |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package loop_2; | |
| import java.lang.*; | |
| public class Test_7 { | |
| /* | |
| * 사용자가 입력한 숫자가 소수인지 합성수인지 판별 1~1000사이에 있는 소수를 모두 출력 | |
| * | |
| * 소수는 나누기 불가 1또는 자기자신으로만 나누어 떨어지는 숫자 2,3,5,7,11,13,17,19 | |
| * |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package loop; | |
| import java.lang.*; | |
| import java.util.*; | |
| public class Test_9 { | |
| /* | |
| * 업다운 게임 | |
| * 술래 (컴퓨터) | |
| * 1~1000 | |
| * 사용자가 정답을 맞추는 게임 | |
| * 사용자가 입력한 값이 정답보다 작으면 컴퓨터는 업 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package loop; | |
| import java.lang.*; | |
| import java.util.*; | |
| public class Test_8 { | |
| public static void main(String[] args) { | |
| /*어떤 게임 시작에서 종료까지 50칸 | |
| * 주사위를 던져서 종료 지점에 가려면 몇번 던져야 하는지 | |
| */ | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package text; | |
| import java.lang.*; | |
| import java.util.*; | |
| public class Test_1 { | |
| public static void main(String[] args) { | |
| Scanner sc = new Scanner(System.in); | |
| System.out.println("연도를 입력하세요"); | |
| int year = sc.nextInt(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package org.opentutorials.javatutorials.numberstring; | |
| import java.lang.*; | |
| import java.util.*; | |
| public class Test_6 { | |
| public static void main(String[] args) { | |
| Scanner sc = new Scanner(System.in); | |
| System.out.println("시간을 4자리로 입력하세요"); | |
| System.out.println("진입 시간을 입력하세요"); | |
| int intime = sc.nextInt(); //진입시간 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package input; | |
| import java.lang.*; | |
| import java.util.*; | |
| public class Test_4 { | |
| /* | |
| * 사용자에게 연도 4자리 입력 | |
| 윤년이면 참 윤년이 아니면 거짓 | |
| 1. 1년 365.24일 윤년 | |
| 2. 400의 배수 윤년 | |
| 3. 100의 배수면 윤년이 아니다 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package basic; | |
| import java.lang.*; | |
| public class Test_1 { | |
| public static void main(String[] args) { | |
| /* | |
| 영화관 이용 요금은 다음과 같습니다. | |
| 성인 : 10000원 청소년 : 7000원 | |
| 성인 2명, 청소년 3명이 영화를 보러가서 제휴카드로 25% 할인을 받았습니다. | |
| 결제금액을 구하여 출력하세요 |