if (vote1 == 1) {
result[0] = result[0] + 1;
i.println(pres1 + " " + result[0]);
}
my if statement are up to 4 (eg: else if (vote1==2...3...4)
). every time i choose multiple candidates, the result will get wrong and sometimes, the output will change. i want that every time i choose candidate 1, his votes will increment and also when i choose other candidates without any changes in the output.
eg:
candidate 1 = 8 (and increment)
candidate 2 = 3 (and increment)
candidate 3 = 5 (and increment)
candidate 4 = 6 (and increment)
please can someone help i really need it for my project