[BE] λμμ° πμ λ€μ΄#1
Conversation
KoungQ
left a comment
There was a problem hiding this comment.
μ μκ°μΌλ‘ λμμ λ릴 μ μμΌλ©΄ μ’κ² λ€ μΆμ΄μ μ½λ λ°μμ νλμ© λ΄€λλ° μ€νλ € μ κ° λ§μ λμμ λ°μ κ² κ°λ€μ..
μμ§ κ°μ²΄μ λ§μ΄ μν¬λ₯Έ μ κ° λ΄μ μ΄λ λΆλΆμ΄ μμ¬μ΄μ§λ νλ³νκΈ° μ΄λ €μ μ§λ§ νλμ© λ―μ΄ μ½μ΄λ΄€μ λ λͺ¨λ μν μ±
μ λΆλ°°μ μ‘΄μ¬ μ΄μ κ° νμ€νκ³ μ½κΈ° νΈνλ€μ
μ½μΌλ©΄μ 곡λΆνλ λλμ΄μμ΅λλ€ κ°μ¬ν©λλ€ :)
| - [x] μΆμΈ‘κ°κ³Ό μ λ΅μ λΉκ΅νλ€. | ||
| - [x] κ²μ μνλ₯Ό λ°ννλ€. | ||
|
|
||
| **κ²μ μν** |
There was a problem hiding this comment.
λ€λ₯Έ λΆλ€ νμ κ±° 보λκΉ μΆμΈ‘ κ°μ΄ μ λ΅λ³΄λ€ ν¬κ±°λ μμ κ²½μ° κ·Έ κ°μ μ μΈν λ²μλ‘ μ§μ νλκ² λ§λ€κ³ μκ°νμ΄μ
μλ₯Όλ€μ΄ λ§μ½ μ¬μ©μκ° aλ₯Ό μ
λ ₯νλλ UPμ΄λ©΄ λ²μκ° b~zλ‘ μ§μ λ μ μλλ‘ λ§μ΄μμ..!
κ·Έλ μ§ μμΌλ©΄ μλμ μΌλ‘ 무νν κ²μμ μ§νν μλ μμκ±°κ³ , μ
λ€μ΄ κ²μ κΈ°λ³Έ μμΉμ΄ μ
λ ₯ κ°μ μ μΈν λ²μ μ€μμ μ ννλκ±°λΌκ³ μκ°ν©λλ€
There was a problem hiding this comment.
μ’μ μ§μ μ΄μμ! μ¬μ€ ꡬννλ€ λμΉ λΆλΆμ λλ€γ γ γ π₯²
κ°μ¬ν΄μ
| private final Scanner scanner = new Scanner(System.in); | ||
|
|
||
| public int readGuessNumberInRange(int start, int end) { | ||
| System.out.print(String.format(GUESS_NUMBER_FORMAT, start, end)); |
There was a problem hiding this comment.
String.formatμ μ°μ§ μμλ λμνλλ° μ΄ μ΄μ κ° λ°λ‘ μμκΉμ?!
There was a problem hiding this comment.
μ΄μ μ + μ°μ°μκ° μ±λ₯μ΄ μ’μ§ μλ€λ κΈμ λ³Έ μ μλλ°, λ€μ μ°Ύμ보λ μλ° 8 μ΄μμΌλ‘λ +μ°μ°μλ μ΅μ νλμ΄ μ±λ₯μ΄ μ’μ κ² κ°λ€μ ^^..
νμ§λ§ μ λ +μ°μ°μλ³΄λ€ μΆλ ₯ ν¬λ§·μ ν λ²μ μμλ‘ κ΄λ¦¬νλ κ² μ μ§λ³΄μμ νΈν κ² κ°μ String.formatμ μ₯μ μ΄ λ ν¬κ² μλΏλ€μγ
γ
γ
κ·Έλμ μμ§κΉμ§λ String.format()μ μ μ©ν κ² κ°μμ π
There was a problem hiding this comment.
μμ + λμ μ¬μ©νμ
¨λκ±°κ΅°μ..!
κ·Όλ° μ λ μ΄λ―Έ μμλ‘ ν¬λ©§ μ ν΄λμ κ±°κ°μμ printfλ₯Ό μ¬μ©νλ€λ©΄ , λ§μΌλ‘λ μΆλ ₯μ΄ κ°λ₯νκ±Έ λ§μλλ €λ΄€μ΅λλ€..!
ex) System.out.printf(GUESS_NUMBER_FORMAT, start, end);
There was a problem hiding this comment.
μ§λ¬Έμ΄ λͺ¨νΈνλ€μ μ£μ‘ν©λλ€ γ
γ
μ λ μμΌλ‘ + λμ String.formatμ μ μ©ν΄λ³Όκ²μ! :)
There was a problem hiding this comment.
μ κ·Έλ κ΅°μ!! printfλ‘ λλ κ² λ κΉλν λ― ν΄μ κ°μ¬ν©λλ€π
λ―Έμ μ€ν κ²°κ³Ό
ν μ€νΈ

μ€ν ν°λ―Έλ


μ«μ.ver
μμ΄.ver
μΆκ°μ¬ν
pr μ¬λ¦¬λ©΄μ 보λ μλ νμλ₯Ό ꡬννμ§ μμλ€μ μΆκ°νκ² μ΅λλ€
κΈ°λ₯ λͺ μΈμ
λ²μ
λμ
μ λ΅
κ²μ μν
μλ νμ