int i = 0;
long rndNr[7] = {0, 0, 0, 0, 0, 0, 0}; // Index 0 = Wurf-Nummer, Index 1 - 6 ist den Augen zugeordnet
void setup() {
// put your setup code here, to run once:
Serial.begin(9600);
}
void loop() {
// put your main code here, to run repeatedly:
i = random(1, 7);
rndNr[0] ++;
rndNr[i] ++;
Serial.print(rndNr[0]);
Serial.print("\t\t");
for (long x = 1; x <= 6; x++){
Serial.print(float(rndNr[x]) / float(rndNr[0]) * 100.0);
Serial.print("%\t\t");
}
Serial.println("");
}