Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added .DS_Store
Binary file not shown.
2 changes: 1 addition & 1 deletion .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions src/.idea/.gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions src/.idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions src/.idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

124 changes: 124 additions & 0 deletions src/.idea/uiDesigner.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions src/.idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file added src/out/production/spartaSpringBasic/Main.class
Binary file not shown.
Binary file not shown.
Binary file not shown.
11 changes: 11 additions & 0 deletions src/spartaSpringBasic.iml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>
3 changes: 2 additions & 1 deletion src/src/Main.java
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import base.Case1;
import yerin.Case1;

public class Main {
public static void main(String[] args) {
Case1 case1 = new Case1();


case1.gameStart(3);

}
Expand Down
30 changes: 30 additions & 0 deletions src/src/yerin/Case1.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
package yerin;
//#1. 복습반 첫번째 문제풀이
import java.util.Scanner;

public class Case1 {

public void gameStart(int randomNum) {
randomNum = 35;
System.out.println("숫자를 입력하세요");
Scanner scanner = new Scanner(System.in);


while (true) {

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;
}

scanner.close();
}
}
}