My code:
function start() {
let valueA = readInt("Rand Seed ID: ");
var points = [0, 0, 0, 0, 0]
for (var i = 0; i < valueA; i++) {
var x = randomizer.nextInt(1, 10)
if (x = 1) {
points.elem[0]++
} else {
if (x = 2 || 3);
points.elem[1]++
} else {
if (x = 4 || 5 || 6 || 7);
points.elem[2]++
} else {
if (x = 8 || 9);
points.elem[3]++
} else {
if (x = 10);
points.elem[4]++
}
}
println("12.5% Point Lies" + points.elem[0] + "Points");
println("25% Point Lies" + points.elem[1] + "Points");
println("50% Point Lies" + points.elem[2] + "Points");
println("75% Point Lies" + points.elem[3] + "Points");
println("87.5% Point Lies" + points.elem[4] + "Points");
}
This code is meant to simulate a 5 point bell curve using a randomizer, but the else statement in line 11 refuses to work properly, no matter how much I mess with it. Please help!
I don’t really know what to try from here!