This file contains 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
import java.util.Objects; | |
import java.util.Scanner; | |
public class Main { | |
public static void main(String[] args) { | |
long totalCount = 127; | |
long pageIndex = 1; | |
Pager pager = new Pager(totalCount); | |
System.out.println(pager.html(pageIndex)); | |
} |
This file contains 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
import java.util.HashSet; | |
import java.util.Objects; | |
import java.util.Scanner; | |
import java.util.Set; | |
public class Main { | |
public static void main(String[] args) { | |
Scanner scanner = new Scanner(System.in); | |
// 나의 좌표 값 |
This file contains 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
import java.io.FileOutputStream; | |
import java.io.IOException; | |
import java.util.Properties; | |
public class Main { | |
public static void main(String[] args) { | |
// 시스템 속성 가져오기 | |
Properties systemProperties = System.getProperties(); | |
// 저장할 파일명 |
This file contains 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
import java.util.Scanner; | |
public class Main { | |
public static int taxRefund(int money){ | |
double tax = 0; | |
double moneyAsDouble = (double) money; | |
if (money > 1000000000){ | |
tax = moneyAsDouble * 0.45 - 65400000; | |
} else if (money <= 1000000000 && money > 500000000) { |
This file contains 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
import java.util.*; | |
public class Main { | |
public static void main(String[] args) { | |
Scanner scanner = new Scanner(System.in); | |
Random random = new Random(); | |
List<Set<Integer>> sets = new ArrayList<>(); | |
Set<Integer> lotto = new HashSet<>(); | |
System.out.println("[로또 당첨 프로그램]"); |
This file contains 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
import java.util.HashMap; | |
import java.util.Map; | |
import java.util.Random; | |
import java.util.Scanner; | |
public class Main { | |
public static void main(String[] args) { | |
HashMap<String, Integer> hashMap = new HashMap<>(); | |
Random random = new Random(); | |
Scanner sc = new Scanner(System.in); |
This file contains 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
import java.time.LocalDate; | |
import java.util.Scanner; | |
public class Main { | |
public static String makeCalendar(int year, int month, int maxLines) { | |
int date = 1; // 일 | |
int day; // 요일 | |
LocalDate firstDate = LocalDate.of(year, month, date); // 해당월 1일 설정 | |
day = firstDate.getDayOfWeek().getValue(); |
This file contains 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
import java.util.Random; | |
import java.util.Scanner; | |
public class Main { | |
public static void main(String[] args) { | |
System.out.println("[주민등록번 계산]"); | |
Scanner scanner = new Scanner(System.in); | |
Random random = new Random(); |
This file contains 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
import java.util.Locale; | |
import java.util.Scanner; | |
public class Main { | |
public static void main(String[] args) { | |
System.out.println("[입장권 계산]"); | |
Scanner scanner = new Scanner(System.in); | |
System.out.print("나이를 입력해 주세요.(숫자):"); |
This file contains 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
import java.util.Scanner; | |
public class Main { | |
public static void main(String[] args) { | |
System.out.println("[캐시백 계산]"); | |
Scanner scanner = new Scanner(System.in); | |
System.out.print("결제 금액을 입력해 주세요. (금액):"); | |
int money = scanner.nextInt(); |
NewerOlder