tasks a-s
This commit is contained in:
parent
47bf37c096
commit
b83f433714
12433 changed files with 156208 additions and 123 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