#include #include #include main() { srand((unsigned) time(NULL)); int dice[6] = {0, 0, 0, 0, 0, 0}, i; for(i=1; i<=1000; i++) dice[rand() % 6]++; printf("Probabilities of each cast of thrown dice:\n"); printf(" 1 2 3 4 5 6\n"); for(i=0; i<=5; i++) printf("%4.3f ", dice[i] / 1000.0); printf("\n"); return(0); }