Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
5
Task/Repeat-a-string/D/repeat-a-string-1.d
Normal file
5
Task/Repeat-a-string/D/repeat-a-string-1.d
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
import std.stdio, std.array;
|
||||
|
||||
void main() {
|
||||
writeln("ha".replicate(5));
|
||||
}
|
||||
8
Task/Repeat-a-string/D/repeat-a-string-2.d
Normal file
8
Task/Repeat-a-string/D/repeat-a-string-2.d
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
import std.stdio;
|
||||
|
||||
void main() {
|
||||
char[] chars; // create the dynamic array
|
||||
chars.length = 5; // set the length
|
||||
chars[] = '*'; // set all characters in the string to '*'
|
||||
writeln(chars);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue