Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ CLASS zcl_crypto_square IMPLEMENTATION.
IF str_len = 0.
RETURN.
ENDIF.
WHILE ( column * row ) < str_len.
WHILE column * row < str_len.
IF column > row.
row += 1.
ELSE.
Expand All @@ -41,7 +41,7 @@ CLASS zcl_crypto_square IMPLEMENTATION.
FOR j = 0 UNTIL j = row
NEXT txt &&= |{
"check offset beyond string length?
COND string( WHEN ( ( j * column ) + i ) >= str_len
COND string( WHEN j * column + i >= str_len
"add space if , more than one row in square
THEN COND string( WHEN row > 1
THEN ` `
Expand Down
8 changes: 4 additions & 4 deletions exercises/practice/darts/.meta/zcl_darts.clas.abap
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,14 @@ ENDCLASS.

CLASS zcl_darts IMPLEMENTATION.
METHOD score.
IF ( ( x * x ) + ( y * y ) ) <= 1.
IF x * x + y * y <= 1.
result = 10.
ELSEIF ( ( x * x ) + ( y * y ) ) <= ( 5 * 5 ).
ELSEIF x * x + y * y <= ( 5 * 5 ).
result = 5.
ELSEIF ( ( x * x ) + ( y * y ) ) <= ( 10 * 10 ).
ELSEIF x * x + y * y <= ( 10 * 10 ).
result = 1.
ENDIF.
ENDMETHOD.


ENDCLASS.
ENDCLASS.