From cb97181b78ab27c6ca2a3046b47cdbdc5a17e396 Mon Sep 17 00:00:00 2001 From: kimhanshin4 Date: Fri, 27 Oct 2023 14:17:02 +0900 Subject: [PATCH] =?UTF-8?q?feature/=EC=88=AB=EC=9E=90=EB=A7=9E=EC=B6=94?= =?UTF-8?q?=EA=B8=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .idea/misc.xml | 2 +- src/src/Hanshin/Case1.java | 26 ++++++++++++++++++++++++++ 2 files changed, 27 insertions(+), 1 deletion(-) create mode 100644 src/src/Hanshin/Case1.java diff --git a/.idea/misc.xml b/.idea/misc.xml index 639900d..a818314 100644 --- a/.idea/misc.xml +++ b/.idea/misc.xml @@ -1,6 +1,6 @@ - + \ No newline at end of file diff --git a/src/src/Hanshin/Case1.java b/src/src/Hanshin/Case1.java new file mode 100644 index 0000000..84556a3 --- /dev/null +++ b/src/src/Hanshin/Case1.java @@ -0,0 +1,26 @@ +package Hanshin; + +import java.util.Scanner; + +public class Case1 { + public void gameStart(int randomNum) { + //여기에 작성해 주세요 + Scanner sc = new Scanner(System.in); + String string = "아 아직이네"; + + while (string == "아 아직이네") { + Integer userInput = Integer.parseInt(sc.nextLine()); + + if (randomNum < userInput) { + System.out.println("Down"); + } else if (randomNum > userInput) { + System.out.println("UP"); + } else { + System.out.println("올ㅋ어케아셨죠!?"); + string = "팍!짝! 됬으!"; + } + } + } + + +} \ No newline at end of file