본문 바로가기

hacking sorcerer

(372)
사과 팝니다 한 입 하세요~~ #include #include ​typedef struct { char* name; int price; int count;} Item;​// Market inventoryItem items[] = { {"Quiet Quiches", 10, 12}, {"Average Apple", 15, 8}, {"Fruitful Flag", 100, 1}};int numItems = sizeof(items) / sizeof(Item);int coins = 40;​void displayItems() { printf("\nWelcome to the market!\n=====================\n"); printf("You have %d coins\n", coins); printf("\tItem\t\t\tPric..
어느새 Java가 나의 모국어가 되었다 package cookie; import java.util.Scanner; public class RoomBooking { public static double[] calculateDiscount(int mileage) { double discountPercentage = 0; if (mileage >= 100) { discountPercentage = 0.10; mileage -= 100; } else if (mileage >= 50) { discountPercentage = 0.05; mileage -= 50; } else if (mileage >= 10) { discountPercentage = 0.01; mileage -= 10; } else { System.out.println("Not enou..
컴퓨터랑 자바로 대화할 수 있는 지경에 이르렀다 public class Polynomial { int degree; long[] coefficients; // Constructor public Polynomial(int deg) { this.degree = deg; this.coefficients = new long[deg + 1]; for (int i = 0; i < deg + 1; i++) { this.coefficients[i] = 0; } } public static Polynomial copy(Polynomial source) { Polynomial newPoly = new Polynomial(source.degree); for (int i = 0; i = 0; i--) { System.out.print(source.coefficients[i..
내가 밖에서 시로 봤는데 흠흐밍 흠흐밍 하면서 돌아다니더라 public class MergeSortString { static void merge(String[] arr, int left, int middle, int right) { // Find sizes of two subarrays to be merged int n1 = middle - left + 1; int n2 = right - middle; /* Create temp arrays */ String[] L = new String[n1]; String[] R = new String[n2]; /*Copy data to temp arrays*/ System.arraycopy(arr, left, L, 0, n1); System.arraycopy(arr, middle + 1, R, 0, n2); /* Merg..
panda's attack public class RaggedArray { public static boolean finding(Integer[][] array) { for (int i = 0; i < array.length; i++) { for (int j = 0; j < array[i].length; j++) { if (array[i][j] == null || array[i][j] == 0) { System.out.print("false "); } else { System.out.print("true "); } } System.out.println(); // Move to the next line after each row } return true; } public static void main(String[] args) { ..
TwoArray.java import java.util.Scanner; public class TwoArrays { public static int findSmallest(int[][] myArray) { int result = myArray[0][0]; for (int i = 0; i myArray[i][j]) { result = myArray[i][j]; } } } return result; } public static int findBiggest(int[][] myArray) { int result = myArray[0][0]; for (int i = 0; i < myArra..
어이 김 씨, 한국은 춥댜 ~ import java.util.Scanner; public class MonthlyTemperature { private static final int WEEKS = 4; private static final int DAYS_IN_WEEK = 7; private static double[][] temperatures = new double[WEEKS][DAYS_IN_WEEK]; private static boolean dataEntered = false; public static void main(String[] args) { Scanner scanner = new Scanner(System.in); int choice; do { displayMenu(); while (!scanner.hasNextInt..
실제의 해킹을 잘하고 싶다면... 지금부터 내가 하려는 얘기는 상당히 주관적인 얘기이다. 그래서 내 의견에 동의하지 않을 사람들도 꽤 많을 것이다. 다만, 그렇게 서로 다르다는 것은 어느 한 쪽의 얘기가 틀렸다기 보다는 그만큼 우리 분야가 다양하다는 것을 뜻할 뿐이라고 생각한다. 만약 내 의견에 동의하지 않고 그것을 감정적인 언어로 표현하지 않고 명백한 근거를 가지고 얘기할 수 있다면 얼마든지 댓글을 달아주시길 감히 부탁드린다. 나도 이번 기회에 한 수 배우고 싶으니까. 가끔씩 해킹과 보안을 실전적으로 어떻게 잘할 수 있냐는 질문을 받기도 한다. 북한 해커들처럼 해킹으로 몇 조원의 암호화폐를 탈취하는 것도 아니고 러시아나 중국 해커들처럼 실제 사이버 전쟁을 치루지도 않는 나로써는 이런 질문에 답변하기 상당히 민망하다. 그리고 솔직히 말해..