I hope I can have some help on this question:
You are to write a C program that would roll from 1 to 3 dices for 1 to 5 players of
board games like snakes and ladders and Monopoly.The program would give you the option to choose to have from 1 to 5 players (prompt
players for their names) and you should also be able to choose to roll between 1, 2,
or 3 dices. For example, if the option of 3 dices were chosen, the roll would display
the count of dice 1, 2, and 3 individually PLUS the sum of all 3 the dices. E.g. say,
the roll of Player Adriano is 2, 6, 4 as shown in the picture on the top right corner of
this page, the roll should be displayed as below:
Player Adriano Roll 1: 2, 6, 4 12
Where 12 is the sum of the roll (2+6+4).
You are to save the dice roll in a text file (a .txt file) as recording of the dice roll. The
text file would also record some simple statistics of the rolls for each individual
player, e.g. most frequently number rolled, average roll, and the percentage of roll.
Eg. In 10 rolls, player Adriano, most frequently rolled 6 on 2 dices, average roll is
6.3, and roll 2 2% of the time, 3 4% of the time, 4 7% of the time … and 12 2% of the
time on 2 dices. The computation should only be done when the user choose to quit
the program, as that is also the only time you have enough data to compute the
statistics and store it in the text file.
Consider also the common board games rule:-
1. If 1 dice is used, the player can roll again if he/she rolled a 6 (six), up to 3
times.
2. If 2 dices were used, the player can roll again if he/she rolled a double (up to
3 times).
3. If 3 dices were used, the player can roll again if he/she rolled a triple (up to 3