Skip to content

Instantly share code, notes, and snippets.

@ororox
Created September 18, 2020 01:04
Show Gist options
  • Save ororox/e0e7695218db23e5bbc179b82718dabf to your computer and use it in GitHub Desktop.
Save ororox/e0e7695218db23e5bbc179b82718dabf to your computer and use it in GitHub Desktop.
자바 연습문제 풀이 2
public class JavaRunner01 {
public static void main(String[] args) {
/* 입력부 */
int firstNumber = 2;
/* 출력변수 */
String prtStr = null;
/* 연산부 */
if (firstNumber > 0) {
prtStr = "첫번째 숫자는 3보다 크다";
}
if (firstNumber <= 1) {
prtStr = "첫번째 숫자는 1보다 작거나 같다";
}
if (firstNumber == 2) {
prtStr = "첫번째 숫자는 2이다";
}
/* 출력부 */
System.out.println("***************");
System.out.println(prtStr);
System.out.println("***************");
}
}
@ororox
Copy link
Author

ororox commented Sep 18, 2020

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment