tasks a-s
This commit is contained in:
parent
47bf37c096
commit
b83f433714
12433 changed files with 156208 additions and 123 deletions
16
Task/Repeat-a-string/Objeck/repeat-a-string.objeck
Normal file
16
Task/Repeat-a-string/Objeck/repeat-a-string.objeck
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
bundle Default {
|
||||
class Repeat {
|
||||
function : Main(args : String[]) ~ Nil {
|
||||
Repeat("ha", 5)->PrintLine();
|
||||
}
|
||||
|
||||
function : Repeat(string : String, max : Int) ~ String {
|
||||
repeat : String := String->New();
|
||||
for(i := 0; i < max; i += 1;) {
|
||||
repeat->Append(string);
|
||||
};
|
||||
|
||||
return repeat;
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue