Merged
Conversation
1. 반지름을 입력받아 원의 넓이를 계산하는 함수 2. 사각형의 넓이를 계산하는 함수 3. 사다리꼴의 넓이를 계산하는 함수 4. 원기둥의 넓이를 계산하는 함수 위의 네 개의 함수를 구현하고 숫자가 아닌 경우, 인자의 갯수가 틀린 경우 에러를 반환합니다.
crongro
requested changes
Apr 8, 2019
Contributor
crongro
left a comment
There was a problem hiding this comment.
리뷰남겨드린 것 참고하세요.
담백하게 잘 구현했어요.
| @@ -0,0 +1,48 @@ | |||
| const {PI} = Math | |||
| } | ||
|
|
||
| function cylinderArea(r, h) { | ||
| checkArgumentCount(arguments, 2); |
Contributor
There was a problem hiding this comment.
이런방법이 어색하지만, 요구사항에는 맞는 방법이에요~!
| checkArgumentCount(arguments, 2); | ||
| checkType(arguments); | ||
|
|
||
| return (2 * PI * Math.pow(r, 2)) + 2 * PI * r * h |
Contributor
There was a problem hiding this comment.
circleArea를 재사용할 수 있다면 더 좋을 듯.
Merged
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.
Michelle & 수리
다각형의 넓이 구하기 함수 구현