Open
Conversation
houndci-bot
reviewed
Feb 19, 2018
| end | ||
|
|
||
| row = PrintPascalTriangle.new | ||
| row.printTriangle No newline at end of file |
| end | ||
| end | ||
| end | ||
|
|
|
|
||
| def printTriangle | ||
| max = calculatedRow.flatten.max.to_s.length | ||
| strings = calculatedRow.map {|arr| arr.map {|int| int.to_s.center(max + 3)} } |
There was a problem hiding this comment.
Space between { and | missing.
Space missing inside }.
Line is too long. [81/80]
| triangle | ||
| end | ||
|
|
||
| def printTriangle |
| end | ||
| triangle | ||
| end | ||
|
|
| triangle = [] | ||
| @rows.times do |row| | ||
| line = [1] | ||
| (0..row-1).each {|x| line << (line[x] * (row-x) / (x+1)) } |
There was a problem hiding this comment.
Surrounding space missing for operator -.
Space between { and | missing.
Surrounding space missing for operator +.
| @rows = gets.chomp.to_i | ||
| end | ||
|
|
||
| def calculatedRow |
| print "Enter the depth of the triangle n = " | ||
| @rows = gets.chomp.to_i | ||
| end | ||
|
|
| class PrintPascalTriangle | ||
| def initialize | ||
| print "Enter the depth of the triangle n = " | ||
| @rows = gets.chomp.to_i |
| @@ -0,0 +1,27 @@ | |||
| class PrintPascalTriangle | |||
| def initialize | |||
| print "Enter the depth of the triangle n = " | |||
There was a problem hiding this comment.
Prefer single-quoted strings when you don't need string interpolation or special symbols.
houndci-bot
reviewed
Feb 19, 2018
| end | ||
| end | ||
| row = PrintPascalTriangle.new | ||
| row.printTriangle No newline at end of file |
houndci-bot
reviewed
Feb 19, 2018
| end | ||
|
|
||
| row = PrintPascalTriangle.new | ||
| row.printTriangle No newline at end of file |
Contributor
|
подозрение в плагиате #766 вот только сложно сказать кто у кого. |
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.
Фамилия Имя
Слепенков Дмитрий
Email
Slepenkov95@mail.ru
Номер домашнего задания
1
Ссылка на видео с демо работы
https://youtu.be/i-HFvOaUZyg