reorganizing code
This commit is contained in:
+1
-15
@@ -3,18 +3,4 @@ B = ', ';
|
||||
C = 'world';
|
||||
D = strcat(A, B, C);
|
||||
|
||||
fun append_esclamation_mark(A, n) {
|
||||
|
||||
if n == none:
|
||||
n = 1;
|
||||
|
||||
i = 0;
|
||||
while i < n: {
|
||||
A = strcat(A, '!');
|
||||
i = i + 1;
|
||||
}
|
||||
|
||||
return A;
|
||||
}
|
||||
|
||||
print(append_esclamation_mark(D, 3), '\n');
|
||||
print(D, '\n');
|
||||
Reference in New Issue
Block a user