Open
Conversation
쉼표(,)와 콜론(:)을 구분자로 사용하여 문자열을 분리하고, 각 숫자의 합을 반환하는 기능을 구현했습니다. 입력 예시: '1,2:3' -> 결과: 6
커스텀 구분자(예: //;\n)를 지원하여 사용자 지정 구분자로 문자열을 분리하고 숫자의 합을 계산하는 기능을 추가했습니다. 입력 예시: '//;\n1;2;3' -> 결과: 6
다음과 같은 경우 에러를 처리하는 기능을 추가했습니다: 1. 음수 입력: '-1,2,3' -> [ERROR] 2. 숫자가 아닌 값 입력: '1,a,3' -> [ERROR] 3. 잘못된 커스텀 구분자: '//;n1;2;3' -> [ERROR] 4. 빈 문자열 포함: '1,,2,,3' -> [ERROR] 기능 요구사항을 맞추기 위해 각 에러 메시지를 [ERROR]로 통일했고, 각 에러 상황을 구분해 if문을 통해 구체적으로 처리했습니다.
숫자 하나만 입력된 경우 해당 숫자를 그대로 반환하는 기능을 추가했습니다. 입력 예시: '1' -> 결과: 1 입력 예시: '//;\n1' -> 결과: 1 해당 기능을 반영하여 README 7번도 수정했습니다.
…자, 빈 문자열 포함 시 에러 처리)
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.
과제 시작
README.md에 구현할 기능 목록을 정리해 추가한다.README.md에 정리한 기능 목록 단위로 추가한다.기능 요구 사항
n대의 자동차는 전진 또는 멈출 수 있다.프로그래밍 요구 사항
기본 요구 사항
App.js의run()이다.package.json파일은 변경할 수 없으며, 제공된 라이브러리와 스타일 라이브러리 이외의 외부 라이브러리는 사용하지 않는다.process.exit()를 호출하지 않는다.추가 요구 사항
테스트 도구 및 라이브러리
@woowacourse/mission-utils에서 제공하는 Random 및 Console API를 사용하여 구현한다.Console.readLineAsync()와Console.print()