From 6df0c0566b1f42fbf74af7fc453de68157938394 Mon Sep 17 00:00:00 2001 From: guncow0603 Date: Mon, 30 Oct 2023 17:41:05 +0900 Subject: [PATCH] =?UTF-8?q?=EC=B2=AB=20=EA=B3=BC=EC=A0=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/src/kimgunwoo/Case1.java | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 src/src/kimgunwoo/Case1.java diff --git a/src/src/kimgunwoo/Case1.java b/src/src/kimgunwoo/Case1.java new file mode 100644 index 0000000..74c3c34 --- /dev/null +++ b/src/src/kimgunwoo/Case1.java @@ -0,0 +1,28 @@ +package kimgunwoo; + +import java.util.Scanner; + +public class Case1 { + public void gameStart(int randomNum){ + Scanner scanner = new Scanner(System.in); + int a = 0; + do{ + Integer userInput = Integer.parseInt(scanner.nextLine()); + + if (randomNum < userInput) { + System.out.println("DOWN"); + + } else if (randomNum > userInput) { + System.out.println("UP"); + } else { + System.out.println("GOOD"); + break; + } + a = a + 1 ; + }while (a<0); + } + + +} + +