0
How to fill an array automaticly with "#" and " "?
Hello, is it possible to fill an char or string array automaticly with "#" an " " alternately? Can somebody explain me how i can fill it? It would be also helpfull if someone can explain me even how to fill an array only with "#".
4 Antworten
+ 2
for (0...array.size){
if(random.boolean())
array[i] = " ";
else
array[i] = " #";
}
It is just algorithm, translate to your programming language
+ 1
Peter Möhle any attempts to translate?
0
use a for loop to go through the array and assign every index
0
Can somebody transform Maria Vasilyova's code in c#? I cant do it