[문자열 덧셈 계산기] 이현제 미션 제출합니다.#125
Open
HyunjeLee wants to merge 15 commits intowoowacourse-precourse:mainfrom
Open
[문자열 덧셈 계산기] 이현제 미션 제출합니다.#125HyunjeLee wants to merge 15 commits intowoowacourse-precourse:mainfrom
HyunjeLee wants to merge 15 commits intowoowacourse-precourse:mainfrom
Conversation
Use readline() from camp.nextstep.edu.missionutils.Console
Change extractNumber() to substring custom standard in input
| fun extractNumber(input: String): List<String> { | ||
| if (input == "") return listOf("0") | ||
|
|
||
| return input.substringAfter("\\n").split(*delimiter.toTypedArray()) |
There was a problem hiding this comment.
* 이거는 한번도 사용 해본 적이 없었는데 덕분에 한 수 배워갑니다.
| makeCustomDelimiter(input) | ||
| } | ||
|
|
||
| println("결과 : ${calculateSum(extractNumber(input))}") |
There was a problem hiding this comment.
지금은 이해하기 쉽지만, 이후 중첩이 늘어난다면 단번에 이해하기 어려울 거 같아요
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🥞 개요
구분자를 이용한 문자열 덧셈 계산기
📜 기능 목록
camp.nextstep.edu.missionutils.Console의readLine()을 활용한다.,,:System.exit()또는exitProcess()를 호출하지 않는다.✅ 점검사항
[$미션제목] $이름 미션 제출합니다.형식의 제목 작성ex) [문자열 덧셈 계산기] 이현제 미션 제출합니다.