Hi,
I don't get exactly for what purpose you want your user to search for true and false.
But changing the following lines of code where you're getting error will resolve your error.
for (int i = 0; i < boolVektor.Length; i++)
{
int slump = newRandom.Next(0, 2);
if (slump == 0)
boolVektor[i] = true;
else
boolVektor[i] = false;
}
As you're beginner I give a try to make it clear for you.
Do you know what is an array?, I guess you know that's why you have used a
for loop, because we use loops normally when we work on the collections. Array is a collection of something. Take it like a plural not a singular. You were assigning a single value to the whole collection, in your case this collection can be of any random length between 1 to 101, since you have defined it.
int slumpTal = newRandom.Next(1, 101);
Now when you were trying to assign a single value to the whole array at once it was giving you an error. Try assigning values one by one, index by index as I have shown you.
Hope this will help, if any confusion is left I am open for more discussions.
Happy learning!